google-cloud-compute-v1 2.0.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +14 -14
- data/lib/google/cloud/compute/v1/compute_pb.rb +42 -10746
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +98 -5
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +75 -13
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +8 -6
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +18 -18
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/images/rest/client.rb +9 -7
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +11 -11
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +20 -20
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +97 -8
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +66 -7
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +95 -5
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +107 -45
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +16 -16
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +11 -11
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +94 -4
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +75 -13
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +3 -3
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +13 -13
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +97 -4
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +74 -12
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +19 -19
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_instance_templates/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +626 -0
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +291 -0
- data/lib/google/cloud/compute/v1/region_instance_templates/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/region_instance_templates.rb +47 -0
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +17 -17
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +10 -10
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +12 -12
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +11 -11
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +5 -5
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +11 -11
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +7 -7
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +9 -9
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +8 -8
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +6 -6
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +6 -4
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +4 -4
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +7 -5
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1.rb +1 -0
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/cloud/compute/v1/compute.rb +414 -29
- metadata +9 -4
@@ -155,6 +155,8 @@ module Google
|
|
155
155
|
|
156
156
|
default_config.rpcs.set_min_cpu_platform.timeout = 600.0
|
157
157
|
|
158
|
+
default_config.rpcs.set_name.timeout = 600.0
|
159
|
+
|
158
160
|
default_config.rpcs.set_scheduling.timeout = 600.0
|
159
161
|
|
160
162
|
default_config.rpcs.set_service_account.timeout = 600.0
|
@@ -238,7 +240,7 @@ module Google
|
|
238
240
|
credentials = @config.credentials
|
239
241
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
240
242
|
# but only if the default endpoint does not have a region prefix.
|
241
|
-
enable_self_signed_jwt = @config.endpoint ==
|
243
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
242
244
|
!@config.endpoint.split(".").first.include?("-")
|
243
245
|
credentials ||= Credentials.default scope: @config.scope,
|
244
246
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -898,7 +900,7 @@ module Google
|
|
898
900
|
end
|
899
901
|
|
900
902
|
##
|
901
|
-
# Returns the specified Instance resource.
|
903
|
+
# Returns the specified Instance resource.
|
902
904
|
#
|
903
905
|
# @overload get(request, options = nil)
|
904
906
|
# Pass arguments to `get` via a request object, either of type
|
@@ -2526,6 +2528,85 @@ module Google
|
|
2526
2528
|
raise ::Google::Cloud::Error.from_error(e)
|
2527
2529
|
end
|
2528
2530
|
|
2531
|
+
##
|
2532
|
+
# Sets name of an instance.
|
2533
|
+
#
|
2534
|
+
# @overload set_name(request, options = nil)
|
2535
|
+
# Pass arguments to `set_name` via a request object, either of type
|
2536
|
+
# {::Google::Cloud::Compute::V1::SetNameInstanceRequest} or an equivalent Hash.
|
2537
|
+
#
|
2538
|
+
# @param request [::Google::Cloud::Compute::V1::SetNameInstanceRequest, ::Hash]
|
2539
|
+
# A request object representing the call parameters. Required. To specify no
|
2540
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2541
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2542
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2543
|
+
#
|
2544
|
+
# @overload set_name(instance: nil, instances_set_name_request_resource: nil, project: nil, request_id: nil, zone: nil)
|
2545
|
+
# Pass arguments to `set_name` via keyword arguments. Note that at
|
2546
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2547
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2548
|
+
#
|
2549
|
+
# @param instance [::String]
|
2550
|
+
# The instance name for this request.
|
2551
|
+
# @param instances_set_name_request_resource [::Google::Cloud::Compute::V1::InstancesSetNameRequest, ::Hash]
|
2552
|
+
# The body resource for this request
|
2553
|
+
# @param project [::String]
|
2554
|
+
# Project ID for this request.
|
2555
|
+
# @param request_id [::String]
|
2556
|
+
# 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).
|
2557
|
+
# @param zone [::String]
|
2558
|
+
# The name of the zone for this request.
|
2559
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2560
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
2561
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2562
|
+
#
|
2563
|
+
# @return [::Gapic::GenericLRO::Operation]
|
2564
|
+
#
|
2565
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2566
|
+
def set_name request, options = nil
|
2567
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2568
|
+
|
2569
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetNameInstanceRequest
|
2570
|
+
|
2571
|
+
# Converts hash and nil to an options object
|
2572
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2573
|
+
|
2574
|
+
# Customize the options with defaults
|
2575
|
+
call_metadata = @config.rpcs.set_name.metadata.to_h
|
2576
|
+
|
2577
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2578
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2579
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2580
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
2581
|
+
transports_version_send: [:rest]
|
2582
|
+
|
2583
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2584
|
+
|
2585
|
+
options.apply_defaults timeout: @config.rpcs.set_name.timeout,
|
2586
|
+
metadata: call_metadata,
|
2587
|
+
retry_policy: @config.rpcs.set_name.retry_policy
|
2588
|
+
|
2589
|
+
options.apply_defaults timeout: @config.timeout,
|
2590
|
+
metadata: @config.metadata,
|
2591
|
+
retry_policy: @config.retry_policy
|
2592
|
+
|
2593
|
+
@instances_stub.set_name request, options do |result, response|
|
2594
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
2595
|
+
operation: result,
|
2596
|
+
client: zone_operations,
|
2597
|
+
request_values: {
|
2598
|
+
"project" => request.project,
|
2599
|
+
"zone" => request.zone
|
2600
|
+
},
|
2601
|
+
options: options
|
2602
|
+
)
|
2603
|
+
yield result, response if block_given?
|
2604
|
+
return result
|
2605
|
+
end
|
2606
|
+
rescue ::Gapic::Rest::Error => e
|
2607
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2608
|
+
end
|
2609
|
+
|
2529
2610
|
##
|
2530
2611
|
# 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 information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.
|
2531
2612
|
#
|
@@ -3742,9 +3823,9 @@ module Google
|
|
3742
3823
|
# * (`String`) The path to a service account key file in JSON format
|
3743
3824
|
# * (`Hash`) A service account key as a Hash
|
3744
3825
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
3745
|
-
# (see the [googleauth docs](https://
|
3826
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
3746
3827
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
3747
|
-
# (see the [signet docs](https://
|
3828
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
3748
3829
|
# * (`nil`) indicating no credentials
|
3749
3830
|
# @return [::Object]
|
3750
3831
|
# @!attribute [rw] scope
|
@@ -3777,7 +3858,9 @@ module Google
|
|
3777
3858
|
class Configuration
|
3778
3859
|
extend ::Gapic::Config
|
3779
3860
|
|
3780
|
-
|
3861
|
+
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
3862
|
+
|
3863
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
3781
3864
|
config_attr :credentials, nil do |value|
|
3782
3865
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
3783
3866
|
allowed.any? { |klass| klass === value }
|
@@ -3978,6 +4061,11 @@ module Google
|
|
3978
4061
|
#
|
3979
4062
|
attr_reader :set_min_cpu_platform
|
3980
4063
|
##
|
4064
|
+
# RPC-specific configuration for `set_name`
|
4065
|
+
# @return [::Gapic::Config::Method]
|
4066
|
+
#
|
4067
|
+
attr_reader :set_name
|
4068
|
+
##
|
3981
4069
|
# RPC-specific configuration for `set_scheduling`
|
3982
4070
|
# @return [::Gapic::Config::Method]
|
3983
4071
|
#
|
@@ -4115,6 +4203,8 @@ module Google
|
|
4115
4203
|
@set_metadata = ::Gapic::Config::Method.new set_metadata_config
|
4116
4204
|
set_min_cpu_platform_config = parent_rpcs.set_min_cpu_platform if parent_rpcs.respond_to? :set_min_cpu_platform
|
4117
4205
|
@set_min_cpu_platform = ::Gapic::Config::Method.new set_min_cpu_platform_config
|
4206
|
+
set_name_config = parent_rpcs.set_name if parent_rpcs.respond_to? :set_name
|
4207
|
+
@set_name = ::Gapic::Config::Method.new set_name_config
|
4118
4208
|
set_scheduling_config = parent_rpcs.set_scheduling if parent_rpcs.respond_to? :set_scheduling
|
4119
4209
|
@set_scheduling = ::Gapic::Config::Method.new set_scheduling_config
|
4120
4210
|
set_service_account_config = parent_rpcs.set_service_account if parent_rpcs.respond_to? :set_service_account
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_add_access_config_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_add_resource_policies_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
|
136
136
|
verb, uri, query_string_params, body = ServiceStub.transcode_aggregated_list_request request_pb
|
137
137
|
query_string_params = if query_string_params.any?
|
138
|
-
query_string_params.to_h { |p| p.split
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
139
|
else
|
140
140
|
{}
|
141
141
|
end
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
|
174
174
|
verb, uri, query_string_params, body = ServiceStub.transcode_attach_disk_request request_pb
|
175
175
|
query_string_params = if query_string_params.any?
|
176
|
-
query_string_params.to_h { |p| p.split
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
177
|
else
|
178
178
|
{}
|
179
179
|
end
|
@@ -211,7 +211,7 @@ module Google
|
|
211
211
|
|
212
212
|
verb, uri, query_string_params, body = ServiceStub.transcode_bulk_insert_request request_pb
|
213
213
|
query_string_params = if query_string_params.any?
|
214
|
-
query_string_params.to_h { |p| p.split
|
214
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
215
215
|
else
|
216
216
|
{}
|
217
217
|
end
|
@@ -249,7 +249,7 @@ module Google
|
|
249
249
|
|
250
250
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_request request_pb
|
251
251
|
query_string_params = if query_string_params.any?
|
252
|
-
query_string_params.to_h { |p| p.split
|
252
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
253
253
|
else
|
254
254
|
{}
|
255
255
|
end
|
@@ -287,7 +287,7 @@ module Google
|
|
287
287
|
|
288
288
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_access_config_request request_pb
|
289
289
|
query_string_params = if query_string_params.any?
|
290
|
-
query_string_params.to_h { |p| p.split
|
290
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
291
291
|
else
|
292
292
|
{}
|
293
293
|
end
|
@@ -325,7 +325,7 @@ module Google
|
|
325
325
|
|
326
326
|
verb, uri, query_string_params, body = ServiceStub.transcode_detach_disk_request request_pb
|
327
327
|
query_string_params = if query_string_params.any?
|
328
|
-
query_string_params.to_h { |p| p.split
|
328
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
329
329
|
else
|
330
330
|
{}
|
331
331
|
end
|
@@ -363,7 +363,7 @@ module Google
|
|
363
363
|
|
364
364
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_request request_pb
|
365
365
|
query_string_params = if query_string_params.any?
|
366
|
-
query_string_params.to_h { |p| p.split
|
366
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
367
367
|
else
|
368
368
|
{}
|
369
369
|
end
|
@@ -401,7 +401,7 @@ module Google
|
|
401
401
|
|
402
402
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_firewalls_request request_pb
|
403
403
|
query_string_params = if query_string_params.any?
|
404
|
-
query_string_params.to_h { |p| p.split
|
404
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
405
405
|
else
|
406
406
|
{}
|
407
407
|
end
|
@@ -439,7 +439,7 @@ module Google
|
|
439
439
|
|
440
440
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_guest_attributes_request request_pb
|
441
441
|
query_string_params = if query_string_params.any?
|
442
|
-
query_string_params.to_h { |p| p.split
|
442
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
443
443
|
else
|
444
444
|
{}
|
445
445
|
end
|
@@ -477,7 +477,7 @@ module Google
|
|
477
477
|
|
478
478
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
|
479
479
|
query_string_params = if query_string_params.any?
|
480
|
-
query_string_params.to_h { |p| p.split
|
480
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
481
481
|
else
|
482
482
|
{}
|
483
483
|
end
|
@@ -515,7 +515,7 @@ module Google
|
|
515
515
|
|
516
516
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_screenshot_request request_pb
|
517
517
|
query_string_params = if query_string_params.any?
|
518
|
-
query_string_params.to_h { |p| p.split
|
518
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
519
519
|
else
|
520
520
|
{}
|
521
521
|
end
|
@@ -553,7 +553,7 @@ module Google
|
|
553
553
|
|
554
554
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_serial_port_output_request request_pb
|
555
555
|
query_string_params = if query_string_params.any?
|
556
|
-
query_string_params.to_h { |p| p.split
|
556
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
557
557
|
else
|
558
558
|
{}
|
559
559
|
end
|
@@ -591,7 +591,7 @@ module Google
|
|
591
591
|
|
592
592
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_shielded_instance_identity_request request_pb
|
593
593
|
query_string_params = if query_string_params.any?
|
594
|
-
query_string_params.to_h { |p| p.split
|
594
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
595
595
|
else
|
596
596
|
{}
|
597
597
|
end
|
@@ -629,7 +629,7 @@ module Google
|
|
629
629
|
|
630
630
|
verb, uri, query_string_params, body = ServiceStub.transcode_insert_request request_pb
|
631
631
|
query_string_params = if query_string_params.any?
|
632
|
-
query_string_params.to_h { |p| p.split
|
632
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
633
633
|
else
|
634
634
|
{}
|
635
635
|
end
|
@@ -667,7 +667,7 @@ module Google
|
|
667
667
|
|
668
668
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
|
669
669
|
query_string_params = if query_string_params.any?
|
670
|
-
query_string_params.to_h { |p| p.split
|
670
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
671
671
|
else
|
672
672
|
{}
|
673
673
|
end
|
@@ -705,7 +705,7 @@ module Google
|
|
705
705
|
|
706
706
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_referrers_request request_pb
|
707
707
|
query_string_params = if query_string_params.any?
|
708
|
-
query_string_params.to_h { |p| p.split
|
708
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
709
709
|
else
|
710
710
|
{}
|
711
711
|
end
|
@@ -743,7 +743,7 @@ module Google
|
|
743
743
|
|
744
744
|
verb, uri, query_string_params, body = ServiceStub.transcode_remove_resource_policies_request request_pb
|
745
745
|
query_string_params = if query_string_params.any?
|
746
|
-
query_string_params.to_h { |p| p.split
|
746
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
747
747
|
else
|
748
748
|
{}
|
749
749
|
end
|
@@ -781,7 +781,7 @@ module Google
|
|
781
781
|
|
782
782
|
verb, uri, query_string_params, body = ServiceStub.transcode_reset_request request_pb
|
783
783
|
query_string_params = if query_string_params.any?
|
784
|
-
query_string_params.to_h { |p| p.split
|
784
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
785
785
|
else
|
786
786
|
{}
|
787
787
|
end
|
@@ -819,7 +819,7 @@ module Google
|
|
819
819
|
|
820
820
|
verb, uri, query_string_params, body = ServiceStub.transcode_resume_request request_pb
|
821
821
|
query_string_params = if query_string_params.any?
|
822
|
-
query_string_params.to_h { |p| p.split
|
822
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
823
823
|
else
|
824
824
|
{}
|
825
825
|
end
|
@@ -857,7 +857,7 @@ module Google
|
|
857
857
|
|
858
858
|
verb, uri, query_string_params, body = ServiceStub.transcode_send_diagnostic_interrupt_request request_pb
|
859
859
|
query_string_params = if query_string_params.any?
|
860
|
-
query_string_params.to_h { |p| p.split
|
860
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
861
861
|
else
|
862
862
|
{}
|
863
863
|
end
|
@@ -895,7 +895,7 @@ module Google
|
|
895
895
|
|
896
896
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_deletion_protection_request request_pb
|
897
897
|
query_string_params = if query_string_params.any?
|
898
|
-
query_string_params.to_h { |p| p.split
|
898
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
899
899
|
else
|
900
900
|
{}
|
901
901
|
end
|
@@ -933,7 +933,7 @@ module Google
|
|
933
933
|
|
934
934
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_disk_auto_delete_request request_pb
|
935
935
|
query_string_params = if query_string_params.any?
|
936
|
-
query_string_params.to_h { |p| p.split
|
936
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
937
937
|
else
|
938
938
|
{}
|
939
939
|
end
|
@@ -971,7 +971,7 @@ module Google
|
|
971
971
|
|
972
972
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
|
973
973
|
query_string_params = if query_string_params.any?
|
974
|
-
query_string_params.to_h { |p| p.split
|
974
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
975
975
|
else
|
976
976
|
{}
|
977
977
|
end
|
@@ -1009,7 +1009,7 @@ module Google
|
|
1009
1009
|
|
1010
1010
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_labels_request request_pb
|
1011
1011
|
query_string_params = if query_string_params.any?
|
1012
|
-
query_string_params.to_h { |p| p.split
|
1012
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1013
1013
|
else
|
1014
1014
|
{}
|
1015
1015
|
end
|
@@ -1047,7 +1047,7 @@ module Google
|
|
1047
1047
|
|
1048
1048
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_machine_resources_request request_pb
|
1049
1049
|
query_string_params = if query_string_params.any?
|
1050
|
-
query_string_params.to_h { |p| p.split
|
1050
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1051
1051
|
else
|
1052
1052
|
{}
|
1053
1053
|
end
|
@@ -1085,7 +1085,7 @@ module Google
|
|
1085
1085
|
|
1086
1086
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_machine_type_request request_pb
|
1087
1087
|
query_string_params = if query_string_params.any?
|
1088
|
-
query_string_params.to_h { |p| p.split
|
1088
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1089
1089
|
else
|
1090
1090
|
{}
|
1091
1091
|
end
|
@@ -1123,7 +1123,7 @@ module Google
|
|
1123
1123
|
|
1124
1124
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_metadata_request request_pb
|
1125
1125
|
query_string_params = if query_string_params.any?
|
1126
|
-
query_string_params.to_h { |p| p.split
|
1126
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1127
1127
|
else
|
1128
1128
|
{}
|
1129
1129
|
end
|
@@ -1161,7 +1161,45 @@ module Google
|
|
1161
1161
|
|
1162
1162
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_min_cpu_platform_request request_pb
|
1163
1163
|
query_string_params = if query_string_params.any?
|
1164
|
-
query_string_params.to_h { |p| p.split
|
1164
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1165
|
+
else
|
1166
|
+
{}
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
response = @client_stub.make_http_request(
|
1170
|
+
verb,
|
1171
|
+
uri: uri,
|
1172
|
+
body: body || "",
|
1173
|
+
params: query_string_params,
|
1174
|
+
options: options
|
1175
|
+
)
|
1176
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1177
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
1178
|
+
|
1179
|
+
yield result, operation if block_given?
|
1180
|
+
result
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
##
|
1184
|
+
# Baseline implementation for the set_name REST call
|
1185
|
+
#
|
1186
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetNameInstanceRequest]
|
1187
|
+
# A request object representing the call parameters. Required.
|
1188
|
+
# @param options [::Gapic::CallOptions]
|
1189
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1190
|
+
#
|
1191
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1192
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
1193
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1194
|
+
#
|
1195
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
1196
|
+
# A result object deserialized from the server's reply
|
1197
|
+
def set_name request_pb, options = nil
|
1198
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1199
|
+
|
1200
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_set_name_request request_pb
|
1201
|
+
query_string_params = if query_string_params.any?
|
1202
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1165
1203
|
else
|
1166
1204
|
{}
|
1167
1205
|
end
|
@@ -1199,7 +1237,7 @@ module Google
|
|
1199
1237
|
|
1200
1238
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_scheduling_request request_pb
|
1201
1239
|
query_string_params = if query_string_params.any?
|
1202
|
-
query_string_params.to_h { |p| p.split
|
1240
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1203
1241
|
else
|
1204
1242
|
{}
|
1205
1243
|
end
|
@@ -1237,7 +1275,7 @@ module Google
|
|
1237
1275
|
|
1238
1276
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_service_account_request request_pb
|
1239
1277
|
query_string_params = if query_string_params.any?
|
1240
|
-
query_string_params.to_h { |p| p.split
|
1278
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1241
1279
|
else
|
1242
1280
|
{}
|
1243
1281
|
end
|
@@ -1275,7 +1313,7 @@ module Google
|
|
1275
1313
|
|
1276
1314
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_shielded_instance_integrity_policy_request request_pb
|
1277
1315
|
query_string_params = if query_string_params.any?
|
1278
|
-
query_string_params.to_h { |p| p.split
|
1316
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1279
1317
|
else
|
1280
1318
|
{}
|
1281
1319
|
end
|
@@ -1313,7 +1351,7 @@ module Google
|
|
1313
1351
|
|
1314
1352
|
verb, uri, query_string_params, body = ServiceStub.transcode_set_tags_request request_pb
|
1315
1353
|
query_string_params = if query_string_params.any?
|
1316
|
-
query_string_params.to_h { |p| p.split
|
1354
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1317
1355
|
else
|
1318
1356
|
{}
|
1319
1357
|
end
|
@@ -1351,7 +1389,7 @@ module Google
|
|
1351
1389
|
|
1352
1390
|
verb, uri, query_string_params, body = ServiceStub.transcode_simulate_maintenance_event_request request_pb
|
1353
1391
|
query_string_params = if query_string_params.any?
|
1354
|
-
query_string_params.to_h { |p| p.split
|
1392
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1355
1393
|
else
|
1356
1394
|
{}
|
1357
1395
|
end
|
@@ -1389,7 +1427,7 @@ module Google
|
|
1389
1427
|
|
1390
1428
|
verb, uri, query_string_params, body = ServiceStub.transcode_start_request request_pb
|
1391
1429
|
query_string_params = if query_string_params.any?
|
1392
|
-
query_string_params.to_h { |p| p.split
|
1430
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1393
1431
|
else
|
1394
1432
|
{}
|
1395
1433
|
end
|
@@ -1427,7 +1465,7 @@ module Google
|
|
1427
1465
|
|
1428
1466
|
verb, uri, query_string_params, body = ServiceStub.transcode_start_with_encryption_key_request request_pb
|
1429
1467
|
query_string_params = if query_string_params.any?
|
1430
|
-
query_string_params.to_h { |p| p.split
|
1468
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1431
1469
|
else
|
1432
1470
|
{}
|
1433
1471
|
end
|
@@ -1465,7 +1503,7 @@ module Google
|
|
1465
1503
|
|
1466
1504
|
verb, uri, query_string_params, body = ServiceStub.transcode_stop_request request_pb
|
1467
1505
|
query_string_params = if query_string_params.any?
|
1468
|
-
query_string_params.to_h { |p| p.split
|
1506
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1469
1507
|
else
|
1470
1508
|
{}
|
1471
1509
|
end
|
@@ -1503,7 +1541,7 @@ module Google
|
|
1503
1541
|
|
1504
1542
|
verb, uri, query_string_params, body = ServiceStub.transcode_suspend_request request_pb
|
1505
1543
|
query_string_params = if query_string_params.any?
|
1506
|
-
query_string_params.to_h { |p| p.split
|
1544
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1507
1545
|
else
|
1508
1546
|
{}
|
1509
1547
|
end
|
@@ -1541,7 +1579,7 @@ module Google
|
|
1541
1579
|
|
1542
1580
|
verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
|
1543
1581
|
query_string_params = if query_string_params.any?
|
1544
|
-
query_string_params.to_h { |p| p.split
|
1582
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1545
1583
|
else
|
1546
1584
|
{}
|
1547
1585
|
end
|
@@ -1579,7 +1617,7 @@ module Google
|
|
1579
1617
|
|
1580
1618
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_request request_pb
|
1581
1619
|
query_string_params = if query_string_params.any?
|
1582
|
-
query_string_params.to_h { |p| p.split
|
1620
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1583
1621
|
else
|
1584
1622
|
{}
|
1585
1623
|
end
|
@@ -1617,7 +1655,7 @@ module Google
|
|
1617
1655
|
|
1618
1656
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_access_config_request request_pb
|
1619
1657
|
query_string_params = if query_string_params.any?
|
1620
|
-
query_string_params.to_h { |p| p.split
|
1658
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1621
1659
|
else
|
1622
1660
|
{}
|
1623
1661
|
end
|
@@ -1655,7 +1693,7 @@ module Google
|
|
1655
1693
|
|
1656
1694
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_display_device_request request_pb
|
1657
1695
|
query_string_params = if query_string_params.any?
|
1658
|
-
query_string_params.to_h { |p| p.split
|
1696
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1659
1697
|
else
|
1660
1698
|
{}
|
1661
1699
|
end
|
@@ -1693,7 +1731,7 @@ module Google
|
|
1693
1731
|
|
1694
1732
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_network_interface_request request_pb
|
1695
1733
|
query_string_params = if query_string_params.any?
|
1696
|
-
query_string_params.to_h { |p| p.split
|
1734
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1697
1735
|
else
|
1698
1736
|
{}
|
1699
1737
|
end
|
@@ -1731,7 +1769,7 @@ module Google
|
|
1731
1769
|
|
1732
1770
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_shielded_instance_config_request request_pb
|
1733
1771
|
query_string_params = if query_string_params.any?
|
1734
|
-
query_string_params.to_h { |p| p.split
|
1772
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1735
1773
|
else
|
1736
1774
|
{}
|
1737
1775
|
end
|
@@ -2447,6 +2485,30 @@ module Google
|
|
2447
2485
|
transcoder.transcode request_pb
|
2448
2486
|
end
|
2449
2487
|
|
2488
|
+
##
|
2489
|
+
# @private
|
2490
|
+
#
|
2491
|
+
# GRPC transcoding helper method for the set_name REST call
|
2492
|
+
#
|
2493
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetNameInstanceRequest]
|
2494
|
+
# A request object representing the call parameters. Required.
|
2495
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
2496
|
+
# Uri, Body, Query string parameters
|
2497
|
+
def self.transcode_set_name_request request_pb
|
2498
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
2499
|
+
.with_bindings(
|
2500
|
+
uri_method: :post,
|
2501
|
+
uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setName",
|
2502
|
+
body: "instances_set_name_request_resource",
|
2503
|
+
matches: [
|
2504
|
+
["project", %r{^[^/]+/?$}, false],
|
2505
|
+
["zone", %r{^[^/]+/?$}, false],
|
2506
|
+
["instance", %r{^[^/]+/?$}, false]
|
2507
|
+
]
|
2508
|
+
)
|
2509
|
+
transcoder.transcode request_pb
|
2510
|
+
end
|
2511
|
+
|
2450
2512
|
##
|
2451
2513
|
# @private
|
2452
2514
|
#
|
@@ -141,7 +141,7 @@ module Google
|
|
141
141
|
credentials = @config.credentials
|
142
142
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
143
143
|
# but only if the default endpoint does not have a region prefix.
|
144
|
-
enable_self_signed_jwt = @config.endpoint ==
|
144
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
145
145
|
!@config.endpoint.split(".").first.include?("-")
|
146
146
|
credentials ||= Credentials.default scope: @config.scope,
|
147
147
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -738,9 +738,9 @@ module Google
|
|
738
738
|
# * (`String`) The path to a service account key file in JSON format
|
739
739
|
# * (`Hash`) A service account key as a Hash
|
740
740
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
741
|
-
# (see the [googleauth docs](https://
|
741
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
742
742
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
743
|
-
# (see the [signet docs](https://
|
743
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
744
744
|
# * (`nil`) indicating no credentials
|
745
745
|
# @return [::Object]
|
746
746
|
# @!attribute [rw] scope
|
@@ -773,7 +773,9 @@ module Google
|
|
773
773
|
class Configuration
|
774
774
|
extend ::Gapic::Config
|
775
775
|
|
776
|
-
|
776
|
+
DEFAULT_ENDPOINT = "compute.googleapis.com"
|
777
|
+
|
778
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
777
779
|
config_attr :credentials, nil do |value|
|
778
780
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
779
781
|
allowed.any? { |klass| klass === value }
|