google-cloud-compute-v1 2.5.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +37 -10
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +311 -8
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +196 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +230 -10
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +134 -2
- data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +37 -10
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +38 -10
- 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 +35 -8
- 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 +35 -8
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +38 -10
- 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 +35 -8
- 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 +35 -8
- 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 +36 -9
- 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 +37 -10
- 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 +34 -8
- 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 +35 -8
- 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 +38 -10
- 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 +35 -8
- 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 +41 -13
- 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 +39 -11
- 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 +38 -10
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +143 -11
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +76 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +38 -10
- 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 +34 -8
- 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 +34 -8
- 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 +128 -9
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +74 -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 +35 -8
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +35 -8
- 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 +37 -10
- 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 +142 -10
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +76 -2
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +37 -9
- 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 +39 -11
- 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 +35 -8
- 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 +36 -9
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +39 -11
- 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 +38 -10
- 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 +37 -10
- 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 +38 -10
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +36 -9
- 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 +236 -11
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +134 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +242 -10
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +136 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +35 -8
- 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 +335 -8
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +198 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +38 -10
- 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 +34 -8
- 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 +35 -8
- 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 +35 -8
- 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 +35 -8
- 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 +38 -11
- 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 +36 -9
- 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 +35 -8
- 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 +348 -11
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +199 -2
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +35 -8
- 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 +35 -8
- 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 +34 -8
- 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 +451 -12
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +260 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +35 -8
- 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 +36 -9
- 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 +35 -8
- 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 +35 -8
- 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 +35 -8
- 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 +35 -8
- 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 +34 -8
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +38 -10
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +135 -11
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +75 -2
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +45 -13
- 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 +38 -10
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +507 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +179 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +38 -10
- 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 +39 -11
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +39 -11
- 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 +35 -8
- 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 +38 -10
- 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 +38 -10
- 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 +142 -10
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +76 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +142 -10
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +76 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +35 -8
- 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 +38 -10
- 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 +38 -10
- 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 +38 -10
- 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 +38 -10
- 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 +38 -10
- 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 +34 -8
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +34 -8
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +14 -2
- data/lib/google/cloud/compute/v1.rb +1 -0
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
- data/proto_docs/google/protobuf/any.rb +144 -0
- metadata +11 -5
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# The DiskTypes API.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
37
|
+
|
35
38
|
# @private
|
36
39
|
attr_reader :disk_types_stub
|
37
40
|
|
@@ -105,6 +108,15 @@ module Google
|
|
105
108
|
@config
|
106
109
|
end
|
107
110
|
|
111
|
+
##
|
112
|
+
# The effective universe domain
|
113
|
+
#
|
114
|
+
# @return [String]
|
115
|
+
#
|
116
|
+
def universe_domain
|
117
|
+
@disk_types_stub.universe_domain
|
118
|
+
end
|
119
|
+
|
108
120
|
##
|
109
121
|
# Create a new DiskTypes REST client object.
|
110
122
|
#
|
@@ -132,8 +144,9 @@ module Google
|
|
132
144
|
credentials = @config.credentials
|
133
145
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
134
146
|
# but only if the default endpoint does not have a region prefix.
|
135
|
-
enable_self_signed_jwt = @config.endpoint
|
136
|
-
|
147
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
148
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
149
|
+
!@config.endpoint.split(".").first.include?("-"))
|
137
150
|
credentials ||= Credentials.default scope: @config.scope,
|
138
151
|
enable_self_signed_jwt: enable_self_signed_jwt
|
139
152
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -143,7 +156,12 @@ module Google
|
|
143
156
|
@quota_project_id = @config.quota_project
|
144
157
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
145
158
|
|
146
|
-
@disk_types_stub = ::Google::Cloud::Compute::V1::DiskTypes::Rest::ServiceStub.new
|
159
|
+
@disk_types_stub = ::Google::Cloud::Compute::V1::DiskTypes::Rest::ServiceStub.new(
|
160
|
+
endpoint: @config.endpoint,
|
161
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
162
|
+
universe_domain: @config.universe_domain,
|
163
|
+
credentials: credentials
|
164
|
+
)
|
147
165
|
end
|
148
166
|
|
149
167
|
# Service calls
|
@@ -161,13 +179,13 @@ module Google
|
|
161
179
|
# @param options [::Gapic::CallOptions, ::Hash]
|
162
180
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
163
181
|
#
|
164
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
182
|
+
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
|
165
183
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
166
184
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
167
185
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
168
186
|
#
|
169
187
|
# @param filter [::String]
|
170
|
-
# 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. If you want to use AIP-160, your expression must specify the field name, an operator, and the value 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
|
188
|
+
# 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) ``` 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.
|
171
189
|
# @param include_all_scopes [::Boolean]
|
172
190
|
# 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.
|
173
191
|
# @param max_results [::Integer]
|
@@ -180,6 +198,7 @@ module Google
|
|
180
198
|
# Project ID for this request.
|
181
199
|
# @param return_partial_success [::Boolean]
|
182
200
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
201
|
+
# @param service_project_number [::Integer]
|
183
202
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
184
203
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::DiskTypesScopedList>]
|
185
204
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -340,7 +359,7 @@ module Google
|
|
340
359
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
341
360
|
#
|
342
361
|
# @param filter [::String]
|
343
|
-
# 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. If you want to use AIP-160, your expression must specify the field name, an operator, and the value 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
|
362
|
+
# 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) ``` 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.
|
344
363
|
# @param max_results [::Integer]
|
345
364
|
# 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`)
|
346
365
|
# @param order_by [::String]
|
@@ -442,9 +461,9 @@ module Google
|
|
442
461
|
# end
|
443
462
|
#
|
444
463
|
# @!attribute [rw] endpoint
|
445
|
-
#
|
446
|
-
#
|
447
|
-
# @return [::String]
|
464
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
465
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
466
|
+
# @return [::String,nil]
|
448
467
|
# @!attribute [rw] credentials
|
449
468
|
# Credentials to send with calls. You may provide any of the following types:
|
450
469
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -481,13 +500,20 @@ module Google
|
|
481
500
|
# @!attribute [rw] quota_project
|
482
501
|
# A separate project against which to charge quota.
|
483
502
|
# @return [::String]
|
503
|
+
# @!attribute [rw] universe_domain
|
504
|
+
# The universe domain within which to make requests. This determines the
|
505
|
+
# default endpoint URL. The default value of nil uses the environment
|
506
|
+
# universe (usually the default "googleapis.com" universe).
|
507
|
+
# @return [::String,nil]
|
484
508
|
#
|
485
509
|
class Configuration
|
486
510
|
extend ::Gapic::Config
|
487
511
|
|
512
|
+
# @private
|
513
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
488
514
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
489
515
|
|
490
|
-
config_attr :endpoint,
|
516
|
+
config_attr :endpoint, nil, ::String, nil
|
491
517
|
config_attr :credentials, nil do |value|
|
492
518
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
493
519
|
allowed.any? { |klass| klass === value }
|
@@ -499,6 +525,7 @@ module Google
|
|
499
525
|
config_attr :metadata, nil, ::Hash, nil
|
500
526
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
501
527
|
config_attr :quota_project, nil, ::String, nil
|
528
|
+
config_attr :universe_domain, nil, ::String, nil
|
502
529
|
|
503
530
|
# @private
|
504
531
|
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
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# The Disks API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :disks_stub
|
38
41
|
|
@@ -139,6 +142,15 @@ module Google
|
|
139
142
|
@config
|
140
143
|
end
|
141
144
|
|
145
|
+
##
|
146
|
+
# The effective universe domain
|
147
|
+
#
|
148
|
+
# @return [String]
|
149
|
+
#
|
150
|
+
def universe_domain
|
151
|
+
@disks_stub.universe_domain
|
152
|
+
end
|
153
|
+
|
142
154
|
##
|
143
155
|
# Create a new Disks REST client object.
|
144
156
|
#
|
@@ -166,8 +178,9 @@ module Google
|
|
166
178
|
credentials = @config.credentials
|
167
179
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
168
180
|
# but only if the default endpoint does not have a region prefix.
|
169
|
-
enable_self_signed_jwt = @config.endpoint
|
170
|
-
|
181
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
182
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
183
|
+
!@config.endpoint.split(".").first.include?("-"))
|
171
184
|
credentials ||= Credentials.default scope: @config.scope,
|
172
185
|
enable_self_signed_jwt: enable_self_signed_jwt
|
173
186
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -181,9 +194,15 @@ module Google
|
|
181
194
|
config.credentials = credentials
|
182
195
|
config.quota_project = @quota_project_id
|
183
196
|
config.endpoint = @config.endpoint
|
197
|
+
config.universe_domain = @config.universe_domain
|
184
198
|
end
|
185
199
|
|
186
|
-
@disks_stub = ::Google::Cloud::Compute::V1::Disks::Rest::ServiceStub.new
|
200
|
+
@disks_stub = ::Google::Cloud::Compute::V1::Disks::Rest::ServiceStub.new(
|
201
|
+
endpoint: @config.endpoint,
|
202
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
203
|
+
universe_domain: @config.universe_domain,
|
204
|
+
credentials: credentials
|
205
|
+
)
|
187
206
|
end
|
188
207
|
|
189
208
|
##
|
@@ -303,13 +322,13 @@ module Google
|
|
303
322
|
# @param options [::Gapic::CallOptions, ::Hash]
|
304
323
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
305
324
|
#
|
306
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
325
|
+
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
|
307
326
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
308
327
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
309
328
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
310
329
|
#
|
311
330
|
# @param filter [::String]
|
312
|
-
# 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. If you want to use AIP-160, your expression must specify the field name, an operator, and the value 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
|
331
|
+
# 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) ``` 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.
|
313
332
|
# @param include_all_scopes [::Boolean]
|
314
333
|
# 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.
|
315
334
|
# @param max_results [::Integer]
|
@@ -322,6 +341,7 @@ module Google
|
|
322
341
|
# Project ID for this request.
|
323
342
|
# @param return_partial_success [::Boolean]
|
324
343
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
344
|
+
# @param service_project_number [::Integer]
|
325
345
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
326
346
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::DisksScopedList>]
|
327
347
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -944,7 +964,7 @@ module Google
|
|
944
964
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
945
965
|
#
|
946
966
|
# @param filter [::String]
|
947
|
-
# 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. If you want to use AIP-160, your expression must specify the field name, an operator, and the value 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
|
967
|
+
# 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) ``` 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.
|
948
968
|
# @param max_results [::Integer]
|
949
969
|
# 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`)
|
950
970
|
# @param order_by [::String]
|
@@ -1878,9 +1898,9 @@ module Google
|
|
1878
1898
|
# end
|
1879
1899
|
#
|
1880
1900
|
# @!attribute [rw] endpoint
|
1881
|
-
#
|
1882
|
-
#
|
1883
|
-
# @return [::String]
|
1901
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1902
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1903
|
+
# @return [::String,nil]
|
1884
1904
|
# @!attribute [rw] credentials
|
1885
1905
|
# Credentials to send with calls. You may provide any of the following types:
|
1886
1906
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1917,13 +1937,20 @@ module Google
|
|
1917
1937
|
# @!attribute [rw] quota_project
|
1918
1938
|
# A separate project against which to charge quota.
|
1919
1939
|
# @return [::String]
|
1940
|
+
# @!attribute [rw] universe_domain
|
1941
|
+
# The universe domain within which to make requests. This determines the
|
1942
|
+
# default endpoint URL. The default value of nil uses the environment
|
1943
|
+
# universe (usually the default "googleapis.com" universe).
|
1944
|
+
# @return [::String,nil]
|
1920
1945
|
#
|
1921
1946
|
class Configuration
|
1922
1947
|
extend ::Gapic::Config
|
1923
1948
|
|
1949
|
+
# @private
|
1950
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1924
1951
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
1925
1952
|
|
1926
|
-
config_attr :endpoint,
|
1953
|
+
config_attr :endpoint, nil, ::String, nil
|
1927
1954
|
config_attr :credentials, nil do |value|
|
1928
1955
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1929
1956
|
allowed.any? { |klass| klass === value }
|
@@ -1935,6 +1962,7 @@ module Google
|
|
1935
1962
|
config_attr :metadata, nil, ::Hash, nil
|
1936
1963
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1937
1964
|
config_attr :quota_project, nil, ::String, nil
|
1965
|
+
config_attr :universe_domain, nil, ::String, nil
|
1938
1966
|
|
1939
1967
|
# @private
|
1940
1968
|
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 add_resource_policies REST call
|
45
57
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# The ExternalVpnGateways API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :external_vpn_gateways_stub
|
38
41
|
|
@@ -109,6 +112,15 @@ module Google
|
|
109
112
|
@config
|
110
113
|
end
|
111
114
|
|
115
|
+
##
|
116
|
+
# The effective universe domain
|
117
|
+
#
|
118
|
+
# @return [String]
|
119
|
+
#
|
120
|
+
def universe_domain
|
121
|
+
@external_vpn_gateways_stub.universe_domain
|
122
|
+
end
|
123
|
+
|
112
124
|
##
|
113
125
|
# Create a new ExternalVpnGateways REST client object.
|
114
126
|
#
|
@@ -136,8 +148,9 @@ module Google
|
|
136
148
|
credentials = @config.credentials
|
137
149
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
138
150
|
# but only if the default endpoint does not have a region prefix.
|
139
|
-
enable_self_signed_jwt = @config.endpoint
|
140
|
-
|
151
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
152
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
153
|
+
!@config.endpoint.split(".").first.include?("-"))
|
141
154
|
credentials ||= Credentials.default scope: @config.scope,
|
142
155
|
enable_self_signed_jwt: enable_self_signed_jwt
|
143
156
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -151,9 +164,15 @@ module Google
|
|
151
164
|
config.credentials = credentials
|
152
165
|
config.quota_project = @quota_project_id
|
153
166
|
config.endpoint = @config.endpoint
|
167
|
+
config.universe_domain = @config.universe_domain
|
154
168
|
end
|
155
169
|
|
156
|
-
@external_vpn_gateways_stub = ::Google::Cloud::Compute::V1::ExternalVpnGateways::Rest::ServiceStub.new
|
170
|
+
@external_vpn_gateways_stub = ::Google::Cloud::Compute::V1::ExternalVpnGateways::Rest::ServiceStub.new(
|
171
|
+
endpoint: @config.endpoint,
|
172
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
173
|
+
universe_domain: @config.universe_domain,
|
174
|
+
credentials: credentials
|
175
|
+
)
|
157
176
|
end
|
158
177
|
|
159
178
|
##
|
@@ -444,7 +463,7 @@ module Google
|
|
444
463
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
445
464
|
#
|
446
465
|
# @param filter [::String]
|
447
|
-
# 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. If you want to use AIP-160, your expression must specify the field name, an operator, and the value 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
|
466
|
+
# 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) ``` 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.
|
448
467
|
# @param max_results [::Integer]
|
449
468
|
# 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`)
|
450
469
|
# @param order_by [::String]
|
@@ -716,9 +735,9 @@ module Google
|
|
716
735
|
# end
|
717
736
|
#
|
718
737
|
# @!attribute [rw] endpoint
|
719
|
-
#
|
720
|
-
#
|
721
|
-
# @return [::String]
|
738
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
739
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
740
|
+
# @return [::String,nil]
|
722
741
|
# @!attribute [rw] credentials
|
723
742
|
# Credentials to send with calls. You may provide any of the following types:
|
724
743
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -755,13 +774,20 @@ module Google
|
|
755
774
|
# @!attribute [rw] quota_project
|
756
775
|
# A separate project against which to charge quota.
|
757
776
|
# @return [::String]
|
777
|
+
# @!attribute [rw] universe_domain
|
778
|
+
# The universe domain within which to make requests. This determines the
|
779
|
+
# default endpoint URL. The default value of nil uses the environment
|
780
|
+
# universe (usually the default "googleapis.com" universe).
|
781
|
+
# @return [::String,nil]
|
758
782
|
#
|
759
783
|
class Configuration
|
760
784
|
extend ::Gapic::Config
|
761
785
|
|
786
|
+
# @private
|
787
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
762
788
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
763
789
|
|
764
|
-
config_attr :endpoint,
|
790
|
+
config_attr :endpoint, nil, ::String, nil
|
765
791
|
config_attr :credentials, nil do |value|
|
766
792
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
767
793
|
allowed.any? { |klass| klass === value }
|
@@ -773,6 +799,7 @@ module Google
|
|
773
799
|
config_attr :metadata, nil, ::Hash, nil
|
774
800
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
775
801
|
config_attr :quota_project, nil, ::String, nil
|
802
|
+
config_attr :universe_domain, nil, ::String, nil
|
776
803
|
|
777
804
|
# @private
|
778
805
|
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
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# The FirewallPolicies API.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
# @private
|
37
40
|
attr_reader :firewall_policies_stub
|
38
41
|
|
@@ -145,6 +148,15 @@ module Google
|
|
145
148
|
@config
|
146
149
|
end
|
147
150
|
|
151
|
+
##
|
152
|
+
# The effective universe domain
|
153
|
+
#
|
154
|
+
# @return [String]
|
155
|
+
#
|
156
|
+
def universe_domain
|
157
|
+
@firewall_policies_stub.universe_domain
|
158
|
+
end
|
159
|
+
|
148
160
|
##
|
149
161
|
# Create a new FirewallPolicies REST client object.
|
150
162
|
#
|
@@ -172,8 +184,9 @@ module Google
|
|
172
184
|
credentials = @config.credentials
|
173
185
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
174
186
|
# but only if the default endpoint does not have a region prefix.
|
175
|
-
enable_self_signed_jwt = @config.endpoint
|
176
|
-
|
187
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
188
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
189
|
+
!@config.endpoint.split(".").first.include?("-"))
|
177
190
|
credentials ||= Credentials.default scope: @config.scope,
|
178
191
|
enable_self_signed_jwt: enable_self_signed_jwt
|
179
192
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -187,9 +200,15 @@ module Google
|
|
187
200
|
config.credentials = credentials
|
188
201
|
config.quota_project = @quota_project_id
|
189
202
|
config.endpoint = @config.endpoint
|
203
|
+
config.universe_domain = @config.universe_domain
|
190
204
|
end
|
191
205
|
|
192
|
-
@firewall_policies_stub = ::Google::Cloud::Compute::V1::FirewallPolicies::Rest::ServiceStub.new
|
206
|
+
@firewall_policies_stub = ::Google::Cloud::Compute::V1::FirewallPolicies::Rest::ServiceStub.new(
|
207
|
+
endpoint: @config.endpoint,
|
208
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
209
|
+
universe_domain: @config.universe_domain,
|
210
|
+
credentials: credentials
|
211
|
+
)
|
193
212
|
end
|
194
213
|
|
195
214
|
##
|
@@ -980,7 +999,7 @@ module Google
|
|
980
999
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
981
1000
|
#
|
982
1001
|
# @param filter [::String]
|
983
|
-
# 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. If you want to use AIP-160, your expression must specify the field name, an operator, and the value 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
|
1002
|
+
# 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) ``` 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.
|
984
1003
|
# @param max_results [::Integer]
|
985
1004
|
# 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`)
|
986
1005
|
# @param order_by [::String]
|
@@ -1762,9 +1781,9 @@ module Google
|
|
1762
1781
|
# end
|
1763
1782
|
#
|
1764
1783
|
# @!attribute [rw] endpoint
|
1765
|
-
#
|
1766
|
-
#
|
1767
|
-
# @return [::String]
|
1784
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1785
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1786
|
+
# @return [::String,nil]
|
1768
1787
|
# @!attribute [rw] credentials
|
1769
1788
|
# Credentials to send with calls. You may provide any of the following types:
|
1770
1789
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1801,13 +1820,20 @@ module Google
|
|
1801
1820
|
# @!attribute [rw] quota_project
|
1802
1821
|
# A separate project against which to charge quota.
|
1803
1822
|
# @return [::String]
|
1823
|
+
# @!attribute [rw] universe_domain
|
1824
|
+
# The universe domain within which to make requests. This determines the
|
1825
|
+
# default endpoint URL. The default value of nil uses the environment
|
1826
|
+
# universe (usually the default "googleapis.com" universe).
|
1827
|
+
# @return [::String,nil]
|
1804
1828
|
#
|
1805
1829
|
class Configuration
|
1806
1830
|
extend ::Gapic::Config
|
1807
1831
|
|
1832
|
+
# @private
|
1833
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1808
1834
|
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
1809
1835
|
|
1810
|
-
config_attr :endpoint,
|
1836
|
+
config_attr :endpoint, nil, ::String, nil
|
1811
1837
|
config_attr :credentials, nil do |value|
|
1812
1838
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1813
1839
|
allowed.any? { |klass| klass === value }
|
@@ -1819,6 +1845,7 @@ module Google
|
|
1819
1845
|
config_attr :metadata, nil, ::Hash, nil
|
1820
1846
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1821
1847
|
config_attr :quota_project, nil, ::String, nil
|
1848
|
+
config_attr :universe_domain, nil, ::String, nil
|
1822
1849
|
|
1823
1850
|
# @private
|
1824
1851
|
def initialize parent_config = nil
|