google-cloud-compute-v1 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +4 -3
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +4 -3
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +4 -3
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +277 -1
  6. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +182 -0
  7. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +196 -3
  8. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +120 -0
  9. data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
  10. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +4 -3
  11. data/lib/google/cloud/compute/v1/disks/rest/client.rb +4 -3
  12. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +1 -1
  13. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1 -1
  14. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +1 -1
  15. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +4 -3
  16. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +1 -1
  17. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +1 -1
  18. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +2 -2
  19. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +4 -3
  20. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  21. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +1 -1
  22. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +4 -3
  23. data/lib/google/cloud/compute/v1/images/rest/client.rb +1 -1
  24. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +7 -6
  25. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +5 -4
  26. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +4 -3
  27. data/lib/google/cloud/compute/v1/instances/rest/client.rb +109 -4
  28. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
  29. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +4 -3
  30. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  31. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +1 -1
  32. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +94 -2
  33. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
  34. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +1 -1
  35. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +1 -1
  36. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +4 -3
  37. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +108 -3
  38. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +62 -0
  39. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +3 -2
  40. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +5 -4
  41. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1 -1
  42. data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
  43. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +5 -4
  44. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +4 -3
  45. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +4 -3
  46. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +4 -3
  47. data/lib/google/cloud/compute/v1/projects/rest/client.rb +2 -2
  48. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +202 -4
  49. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +120 -0
  50. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +208 -3
  51. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +122 -0
  52. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +1 -1
  53. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +301 -1
  54. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +184 -0
  55. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +4 -3
  56. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  57. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1 -1
  58. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +1 -1
  59. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +1 -1
  60. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +4 -4
  61. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
  62. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +1 -1
  63. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +314 -4
  64. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +185 -0
  65. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1 -1
  66. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +1 -1
  67. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  68. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +417 -5
  69. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +246 -0
  70. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +1 -1
  71. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +2 -2
  72. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +1 -1
  73. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +1 -1
  74. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +1 -1
  75. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
  76. data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
  77. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +4 -3
  78. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +4 -3
  79. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  80. data/lib/google/cloud/compute/v1/routers/rest/client.rb +101 -4
  81. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +61 -0
  82. data/lib/google/cloud/compute/v1/routes/rest/client.rb +1 -1
  83. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +11 -6
  84. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +4 -3
  85. data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
  86. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +480 -0
  87. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +167 -0
  88. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
  89. data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
  90. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +1 -1
  91. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +4 -3
  92. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +5 -4
  93. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +5 -4
  94. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +1 -1
  95. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +4 -3
  96. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +4 -3
  97. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +108 -3
  98. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -0
  99. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +108 -3
  100. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +62 -0
  101. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +1 -1
  102. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +4 -3
  103. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +4 -3
  104. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +4 -3
  105. data/lib/google/cloud/compute/v1/version.rb +1 -1
  106. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +4 -3
  107. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +4 -3
  108. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  109. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  110. data/lib/google/cloud/compute/v1.rb +1 -0
  111. data/proto_docs/google/api/client.rb +13 -0
  112. data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
  113. data/proto_docs/google/protobuf/any.rb +144 -0
  114. metadata +8 -2
@@ -84,6 +84,8 @@ module Google
84
84
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
85
85
  }
86
86
 
87
+ default_config.rpcs.set_security_policy.timeout = 600.0
88
+
87
89
  default_config
88
90
  end
89
91
  yield @configure if block_given?
@@ -179,13 +181,13 @@ module Google
179
181
  # @param options [::Gapic::CallOptions, ::Hash]
180
182
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
181
183
  #
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)
184
+ # @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)
183
185
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
184
186
  # least one keyword argument is required. To specify no parameters, or to keep all
185
187
  # the default parameter values, pass an empty Hash as a request object (see above).
186
188
  #
187
189
  # @param filter [::String]
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. If you want to use AIP-160, your expression must specify the field name, an operator, and the value 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.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`.
190
+ # 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.
189
191
  # @param include_all_scopes [::Boolean]
190
192
  # 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.
191
193
  # @param max_results [::Integer]
@@ -198,6 +200,7 @@ module Google
198
200
  # Project ID for this request.
199
201
  # @param return_partial_success [::Boolean]
200
202
  # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
203
+ # @param service_project_number [::Integer]
201
204
  # @yield [result, operation] Access the result along with the TransportOperation object
202
205
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetInstancesScopedList>]
203
206
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -544,7 +547,7 @@ module Google
544
547
  # the default parameter values, pass an empty Hash as a request object (see above).
545
548
  #
546
549
  # @param filter [::String]
547
- # 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.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`.
550
+ # 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.
548
551
  # @param max_results [::Integer]
549
552
  # 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`)
550
553
  # @param order_by [::String]
@@ -616,6 +619,101 @@ module Google
616
619
  raise ::Google::Cloud::Error.from_error(e)
617
620
  end
618
621
 
622
+ ##
623
+ # Sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview
624
+ #
625
+ # @overload set_security_policy(request, options = nil)
626
+ # Pass arguments to `set_security_policy` via a request object, either of type
627
+ # {::Google::Cloud::Compute::V1::SetSecurityPolicyTargetInstanceRequest} or an equivalent Hash.
628
+ #
629
+ # @param request [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetInstanceRequest, ::Hash]
630
+ # A request object representing the call parameters. Required. To specify no
631
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
632
+ # @param options [::Gapic::CallOptions, ::Hash]
633
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
634
+ #
635
+ # @overload set_security_policy(project: nil, request_id: nil, security_policy_reference_resource: nil, target_instance: nil, zone: nil)
636
+ # Pass arguments to `set_security_policy` via keyword arguments. Note that at
637
+ # least one keyword argument is required. To specify no parameters, or to keep all
638
+ # the default parameter values, pass an empty Hash as a request object (see above).
639
+ #
640
+ # @param project [::String]
641
+ # Project ID for this request.
642
+ # @param request_id [::String]
643
+ # 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).
644
+ # @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
645
+ # The body resource for this request
646
+ # @param target_instance [::String]
647
+ # Name of the TargetInstance resource to which the security policy should be set. The name should conform to RFC1035.
648
+ # @param zone [::String]
649
+ # Name of the zone scoping this request.
650
+ # @yield [result, operation] Access the result along with the TransportOperation object
651
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
652
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
653
+ #
654
+ # @return [::Gapic::GenericLRO::Operation]
655
+ #
656
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
657
+ #
658
+ # @example Basic example
659
+ # require "google/cloud/compute/v1"
660
+ #
661
+ # # Create a client object. The client can be reused for multiple calls.
662
+ # client = Google::Cloud::Compute::V1::TargetInstances::Rest::Client.new
663
+ #
664
+ # # Create a request. To set request fields, pass in keyword arguments.
665
+ # request = Google::Cloud::Compute::V1::SetSecurityPolicyTargetInstanceRequest.new
666
+ #
667
+ # # Call the set_security_policy method.
668
+ # result = client.set_security_policy request
669
+ #
670
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
671
+ # p result
672
+ #
673
+ def set_security_policy request, options = nil
674
+ raise ::ArgumentError, "request must be provided" if request.nil?
675
+
676
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetSecurityPolicyTargetInstanceRequest
677
+
678
+ # Converts hash and nil to an options object
679
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
680
+
681
+ # Customize the options with defaults
682
+ call_metadata = @config.rpcs.set_security_policy.metadata.to_h
683
+
684
+ # Set x-goog-api-client and x-goog-user-project headers
685
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
686
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
687
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
688
+ transports_version_send: [:rest]
689
+
690
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
691
+
692
+ options.apply_defaults timeout: @config.rpcs.set_security_policy.timeout,
693
+ metadata: call_metadata,
694
+ retry_policy: @config.rpcs.set_security_policy.retry_policy
695
+
696
+ options.apply_defaults timeout: @config.timeout,
697
+ metadata: @config.metadata,
698
+ retry_policy: @config.retry_policy
699
+
700
+ @target_instances_stub.set_security_policy request, options do |result, response|
701
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
702
+ operation: result,
703
+ client: zone_operations,
704
+ request_values: {
705
+ "project" => request.project,
706
+ "zone" => request.zone
707
+ },
708
+ options: options
709
+ )
710
+ yield result, response if block_given?
711
+ return result
712
+ end
713
+ rescue ::Gapic::Rest::Error => e
714
+ raise ::Google::Cloud::Error.from_error(e)
715
+ end
716
+
619
717
  ##
620
718
  # Configuration class for the TargetInstances REST API.
621
719
  #
@@ -766,6 +864,11 @@ module Google
766
864
  # @return [::Gapic::Config::Method]
767
865
  #
768
866
  attr_reader :list
867
+ ##
868
+ # RPC-specific configuration for `set_security_policy`
869
+ # @return [::Gapic::Config::Method]
870
+ #
871
+ attr_reader :set_security_policy
769
872
 
770
873
  # @private
771
874
  def initialize parent_rpcs = nil
@@ -779,6 +882,8 @@ module Google
779
882
  @insert = ::Gapic::Config::Method.new insert_config
780
883
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
781
884
  @list = ::Gapic::Config::Method.new list_config
885
+ set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
886
+ @set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
782
887
 
783
888
  yield self if block_given?
784
889
  end
@@ -230,6 +230,44 @@ module Google
230
230
  result
231
231
  end
232
232
 
233
+ ##
234
+ # Baseline implementation for the set_security_policy REST call
235
+ #
236
+ # @param request_pb [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetInstanceRequest]
237
+ # A request object representing the call parameters. Required.
238
+ # @param options [::Gapic::CallOptions]
239
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
240
+ #
241
+ # @yield [result, operation] Access the result along with the TransportOperation object
242
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
243
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
244
+ #
245
+ # @return [::Google::Cloud::Compute::V1::Operation]
246
+ # A result object deserialized from the server's reply
247
+ def set_security_policy request_pb, options = nil
248
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
249
+
250
+ verb, uri, query_string_params, body = ServiceStub.transcode_set_security_policy_request request_pb
251
+ query_string_params = if query_string_params.any?
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
+ else
254
+ {}
255
+ end
256
+
257
+ response = @client_stub.make_http_request(
258
+ verb,
259
+ uri: uri,
260
+ body: body || "",
261
+ params: query_string_params,
262
+ options: options
263
+ )
264
+ operation = ::Gapic::Rest::TransportOperation.new response
265
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
266
+
267
+ yield result, operation if block_given?
268
+ result
269
+ end
270
+
233
271
  ##
234
272
  # @private
235
273
  #
@@ -341,6 +379,30 @@ module Google
341
379
  )
342
380
  transcoder.transcode request_pb
343
381
  end
382
+
383
+ ##
384
+ # @private
385
+ #
386
+ # GRPC transcoding helper method for the set_security_policy REST call
387
+ #
388
+ # @param request_pb [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetInstanceRequest]
389
+ # A request object representing the call parameters. Required.
390
+ # @return [Array(String, [String, nil], Hash{String => String})]
391
+ # Uri, Body, Query string parameters
392
+ def self.transcode_set_security_policy_request request_pb
393
+ transcoder = Gapic::Rest::GrpcTranscoder.new
394
+ .with_bindings(
395
+ uri_method: :post,
396
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/targetInstances/{target_instance}/setSecurityPolicy",
397
+ body: "security_policy_reference_resource",
398
+ matches: [
399
+ ["project", %r{^[^/]+/?$}, false],
400
+ ["zone", %r{^[^/]+/?$}, false],
401
+ ["target_instance", %r{^[^/]+/?$}, false]
402
+ ]
403
+ )
404
+ transcoder.transcode request_pb
405
+ end
344
406
  end
345
407
  end
346
408
  end
@@ -96,6 +96,8 @@ module Google
96
96
 
97
97
  default_config.rpcs.set_backup.timeout = 600.0
98
98
 
99
+ default_config.rpcs.set_security_policy.timeout = 600.0
100
+
99
101
  default_config
100
102
  end
101
103
  yield @configure if block_given?
@@ -381,13 +383,13 @@ module Google
381
383
  # @param options [::Gapic::CallOptions, ::Hash]
382
384
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
383
385
  #
384
- # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
386
+ # @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)
385
387
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
386
388
  # least one keyword argument is required. To specify no parameters, or to keep all
387
389
  # the default parameter values, pass an empty Hash as a request object (see above).
388
390
  #
389
391
  # @param filter [::String]
390
- # 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.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`.
392
+ # 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.
391
393
  # @param include_all_scopes [::Boolean]
392
394
  # 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.
393
395
  # @param max_results [::Integer]
@@ -400,6 +402,7 @@ module Google
400
402
  # Project ID for this request.
401
403
  # @param return_partial_success [::Boolean]
402
404
  # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
405
+ # @param service_project_number [::Integer]
403
406
  # @yield [result, operation] Access the result along with the TransportOperation object
404
407
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetPoolsScopedList>]
405
408
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -830,7 +833,7 @@ module Google
830
833
  # the default parameter values, pass an empty Hash as a request object (see above).
831
834
  #
832
835
  # @param filter [::String]
833
- # 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.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`.
836
+ # 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.
834
837
  # @param max_results [::Integer]
835
838
  # 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`)
836
839
  # @param order_by [::String]
@@ -1189,6 +1192,101 @@ module Google
1189
1192
  raise ::Google::Cloud::Error.from_error(e)
1190
1193
  end
1191
1194
 
1195
+ ##
1196
+ # Sets the Google Cloud Armor security policy for the specified target pool. For more information, see Google Cloud Armor Overview
1197
+ #
1198
+ # @overload set_security_policy(request, options = nil)
1199
+ # Pass arguments to `set_security_policy` via a request object, either of type
1200
+ # {::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest} or an equivalent Hash.
1201
+ #
1202
+ # @param request [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest, ::Hash]
1203
+ # A request object representing the call parameters. Required. To specify no
1204
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1205
+ # @param options [::Gapic::CallOptions, ::Hash]
1206
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1207
+ #
1208
+ # @overload set_security_policy(project: nil, region: nil, request_id: nil, security_policy_reference_resource: nil, target_pool: nil)
1209
+ # Pass arguments to `set_security_policy` via keyword arguments. Note that at
1210
+ # least one keyword argument is required. To specify no parameters, or to keep all
1211
+ # the default parameter values, pass an empty Hash as a request object (see above).
1212
+ #
1213
+ # @param project [::String]
1214
+ # Project ID for this request.
1215
+ # @param region [::String]
1216
+ # Name of the region scoping this request.
1217
+ # @param request_id [::String]
1218
+ # 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).
1219
+ # @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
1220
+ # The body resource for this request
1221
+ # @param target_pool [::String]
1222
+ # Name of the TargetPool resource to which the security policy should be set. The name should conform to RFC1035.
1223
+ # @yield [result, operation] Access the result along with the TransportOperation object
1224
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1225
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1226
+ #
1227
+ # @return [::Gapic::GenericLRO::Operation]
1228
+ #
1229
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1230
+ #
1231
+ # @example Basic example
1232
+ # require "google/cloud/compute/v1"
1233
+ #
1234
+ # # Create a client object. The client can be reused for multiple calls.
1235
+ # client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
1236
+ #
1237
+ # # Create a request. To set request fields, pass in keyword arguments.
1238
+ # request = Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest.new
1239
+ #
1240
+ # # Call the set_security_policy method.
1241
+ # result = client.set_security_policy request
1242
+ #
1243
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1244
+ # p result
1245
+ #
1246
+ def set_security_policy request, options = nil
1247
+ raise ::ArgumentError, "request must be provided" if request.nil?
1248
+
1249
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest
1250
+
1251
+ # Converts hash and nil to an options object
1252
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1253
+
1254
+ # Customize the options with defaults
1255
+ call_metadata = @config.rpcs.set_security_policy.metadata.to_h
1256
+
1257
+ # Set x-goog-api-client and x-goog-user-project headers
1258
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1259
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1260
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1261
+ transports_version_send: [:rest]
1262
+
1263
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1264
+
1265
+ options.apply_defaults timeout: @config.rpcs.set_security_policy.timeout,
1266
+ metadata: call_metadata,
1267
+ retry_policy: @config.rpcs.set_security_policy.retry_policy
1268
+
1269
+ options.apply_defaults timeout: @config.timeout,
1270
+ metadata: @config.metadata,
1271
+ retry_policy: @config.retry_policy
1272
+
1273
+ @target_pools_stub.set_security_policy request, options do |result, response|
1274
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1275
+ operation: result,
1276
+ client: region_operations,
1277
+ request_values: {
1278
+ "project" => request.project,
1279
+ "region" => request.region
1280
+ },
1281
+ options: options
1282
+ )
1283
+ yield result, response if block_given?
1284
+ return result
1285
+ end
1286
+ rescue ::Gapic::Rest::Error => e
1287
+ raise ::Google::Cloud::Error.from_error(e)
1288
+ end
1289
+
1192
1290
  ##
1193
1291
  # Configuration class for the TargetPools REST API.
1194
1292
  #
@@ -1369,6 +1467,11 @@ module Google
1369
1467
  # @return [::Gapic::Config::Method]
1370
1468
  #
1371
1469
  attr_reader :set_backup
1470
+ ##
1471
+ # RPC-specific configuration for `set_security_policy`
1472
+ # @return [::Gapic::Config::Method]
1473
+ #
1474
+ attr_reader :set_security_policy
1372
1475
 
1373
1476
  # @private
1374
1477
  def initialize parent_rpcs = nil
@@ -1394,6 +1497,8 @@ module Google
1394
1497
  @remove_instance = ::Gapic::Config::Method.new remove_instance_config
1395
1498
  set_backup_config = parent_rpcs.set_backup if parent_rpcs.respond_to? :set_backup
1396
1499
  @set_backup = ::Gapic::Config::Method.new set_backup_config
1500
+ set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
1501
+ @set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
1397
1502
 
1398
1503
  yield self if block_given?
1399
1504
  end
@@ -458,6 +458,44 @@ module Google
458
458
  result
459
459
  end
460
460
 
461
+ ##
462
+ # Baseline implementation for the set_security_policy REST call
463
+ #
464
+ # @param request_pb [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest]
465
+ # A request object representing the call parameters. Required.
466
+ # @param options [::Gapic::CallOptions]
467
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
468
+ #
469
+ # @yield [result, operation] Access the result along with the TransportOperation object
470
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
471
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
472
+ #
473
+ # @return [::Google::Cloud::Compute::V1::Operation]
474
+ # A result object deserialized from the server's reply
475
+ def set_security_policy request_pb, options = nil
476
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
477
+
478
+ verb, uri, query_string_params, body = ServiceStub.transcode_set_security_policy_request request_pb
479
+ query_string_params = if query_string_params.any?
480
+ query_string_params.to_h { |p| p.split "=", 2 }
481
+ else
482
+ {}
483
+ end
484
+
485
+ response = @client_stub.make_http_request(
486
+ verb,
487
+ uri: uri,
488
+ body: body || "",
489
+ params: query_string_params,
490
+ options: options
491
+ )
492
+ operation = ::Gapic::Rest::TransportOperation.new response
493
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
494
+
495
+ yield result, operation if block_given?
496
+ result
497
+ end
498
+
461
499
  ##
462
500
  # @private
463
501
  #
@@ -713,6 +751,30 @@ module Google
713
751
  )
714
752
  transcoder.transcode request_pb
715
753
  end
754
+
755
+ ##
756
+ # @private
757
+ #
758
+ # GRPC transcoding helper method for the set_security_policy REST call
759
+ #
760
+ # @param request_pb [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest]
761
+ # A request object representing the call parameters. Required.
762
+ # @return [Array(String, [String, nil], Hash{String => String})]
763
+ # Uri, Body, Query string parameters
764
+ def self.transcode_set_security_policy_request request_pb
765
+ transcoder = Gapic::Rest::GrpcTranscoder.new
766
+ .with_bindings(
767
+ uri_method: :post,
768
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/targetPools/{target_pool}/setSecurityPolicy",
769
+ body: "security_policy_reference_resource",
770
+ matches: [
771
+ ["project", %r{^[^/]+/?$}, false],
772
+ ["region", %r{^[^/]+/?$}, false],
773
+ ["target_pool", %r{^[^/]+/?$}, false]
774
+ ]
775
+ )
776
+ transcoder.transcode request_pb
777
+ end
716
778
  end
717
779
  end
718
780
  end
@@ -450,7 +450,7 @@ module Google
450
450
  # the default parameter values, pass an empty Hash as a request object (see above).
451
451
  #
452
452
  # @param filter [::String]
453
- # 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.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`.
453
+ # 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.
454
454
  # @param max_results [::Integer]
455
455
  # 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`)
456
456
  # @param order_by [::String]
@@ -183,13 +183,13 @@ module Google
183
183
  # @param options [::Gapic::CallOptions, ::Hash]
184
184
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
185
185
  #
186
- # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
186
+ # @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)
187
187
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
188
188
  # least one keyword argument is required. To specify no parameters, or to keep all
189
189
  # the default parameter values, pass an empty Hash as a request object (see above).
190
190
  #
191
191
  # @param filter [::String]
192
- # 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.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`.
192
+ # 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.
193
193
  # @param include_all_scopes [::Boolean]
194
194
  # 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.
195
195
  # @param max_results [::Integer]
@@ -202,6 +202,7 @@ module Google
202
202
  # Name of the project scoping this request.
203
203
  # @param return_partial_success [::Boolean]
204
204
  # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
205
+ # @param service_project_number [::Integer]
205
206
  # @yield [result, operation] Access the result along with the TransportOperation object
206
207
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetTcpProxiesScopedList>]
207
208
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -540,7 +541,7 @@ module Google
540
541
  # the default parameter values, pass an empty Hash as a request object (see above).
541
542
  #
542
543
  # @param filter [::String]
543
- # 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 `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.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`.
544
+ # 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.
544
545
  # @param max_results [::Integer]
545
546
  # 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`)
546
547
  # @param order_by [::String]