google-cloud-compute-v1 2.16.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/v1/compute_pb.rb +24 -1
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +406 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +250 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +631 -0
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +380 -0
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +506 -38
- metadata +3 -3
@@ -73,6 +73,8 @@ module Google
|
|
73
73
|
|
74
74
|
default_config.rpcs.add_association.timeout = 600.0
|
75
75
|
|
76
|
+
default_config.rpcs.add_packet_mirroring_rule.timeout = 600.0
|
77
|
+
|
76
78
|
default_config.rpcs.add_rule.timeout = 600.0
|
77
79
|
|
78
80
|
default_config.rpcs.aggregated_list.timeout = 600.0
|
@@ -99,6 +101,11 @@ module Google
|
|
99
101
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
100
102
|
}
|
101
103
|
|
104
|
+
default_config.rpcs.get_packet_mirroring_rule.timeout = 600.0
|
105
|
+
default_config.rpcs.get_packet_mirroring_rule.retry_policy = {
|
106
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
107
|
+
}
|
108
|
+
|
102
109
|
default_config.rpcs.get_rule.timeout = 600.0
|
103
110
|
default_config.rpcs.get_rule.retry_policy = {
|
104
111
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
@@ -113,10 +120,14 @@ module Google
|
|
113
120
|
|
114
121
|
default_config.rpcs.patch.timeout = 600.0
|
115
122
|
|
123
|
+
default_config.rpcs.patch_packet_mirroring_rule.timeout = 600.0
|
124
|
+
|
116
125
|
default_config.rpcs.patch_rule.timeout = 600.0
|
117
126
|
|
118
127
|
default_config.rpcs.remove_association.timeout = 600.0
|
119
128
|
|
129
|
+
default_config.rpcs.remove_packet_mirroring_rule.timeout = 600.0
|
130
|
+
|
120
131
|
default_config.rpcs.remove_rule.timeout = 600.0
|
121
132
|
|
122
133
|
default_config.rpcs.set_iam_policy.timeout = 600.0
|
@@ -336,6 +347,103 @@ module Google
|
|
336
347
|
raise ::Google::Cloud::Error.from_error(e)
|
337
348
|
end
|
338
349
|
|
350
|
+
##
|
351
|
+
# Inserts a packet mirroring rule into a firewall policy.
|
352
|
+
#
|
353
|
+
# @overload add_packet_mirroring_rule(request, options = nil)
|
354
|
+
# Pass arguments to `add_packet_mirroring_rule` via a request object, either of type
|
355
|
+
# {::Google::Cloud::Compute::V1::AddPacketMirroringRuleNetworkFirewallPolicyRequest} or an equivalent Hash.
|
356
|
+
#
|
357
|
+
# @param request [::Google::Cloud::Compute::V1::AddPacketMirroringRuleNetworkFirewallPolicyRequest, ::Hash]
|
358
|
+
# A request object representing the call parameters. Required. To specify no
|
359
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
360
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
361
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
362
|
+
#
|
363
|
+
# @overload add_packet_mirroring_rule(firewall_policy: nil, firewall_policy_rule_resource: nil, max_priority: nil, min_priority: nil, project: nil, request_id: nil)
|
364
|
+
# Pass arguments to `add_packet_mirroring_rule` via keyword arguments. Note that at
|
365
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
366
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
367
|
+
#
|
368
|
+
# @param firewall_policy [::String]
|
369
|
+
# Name of the firewall policy to update.
|
370
|
+
# @param firewall_policy_rule_resource [::Google::Cloud::Compute::V1::FirewallPolicyRule, ::Hash]
|
371
|
+
# The body resource for this request
|
372
|
+
# @param max_priority [::Integer]
|
373
|
+
# When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority.
|
374
|
+
# @param min_priority [::Integer]
|
375
|
+
# When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority.
|
376
|
+
# @param project [::String]
|
377
|
+
# Project ID for this request.
|
378
|
+
# @param request_id [::String]
|
379
|
+
# 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).
|
380
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
381
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
382
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
383
|
+
#
|
384
|
+
# @return [::Gapic::GenericLRO::Operation]
|
385
|
+
#
|
386
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
387
|
+
#
|
388
|
+
# @example Basic example
|
389
|
+
# require "google/cloud/compute/v1"
|
390
|
+
#
|
391
|
+
# # Create a client object. The client can be reused for multiple calls.
|
392
|
+
# client = Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client.new
|
393
|
+
#
|
394
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
395
|
+
# request = Google::Cloud::Compute::V1::AddPacketMirroringRuleNetworkFirewallPolicyRequest.new
|
396
|
+
#
|
397
|
+
# # Call the add_packet_mirroring_rule method.
|
398
|
+
# result = client.add_packet_mirroring_rule request
|
399
|
+
#
|
400
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
401
|
+
# p result
|
402
|
+
#
|
403
|
+
def add_packet_mirroring_rule request, options = nil
|
404
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
405
|
+
|
406
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AddPacketMirroringRuleNetworkFirewallPolicyRequest
|
407
|
+
|
408
|
+
# Converts hash and nil to an options object
|
409
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
410
|
+
|
411
|
+
# Customize the options with defaults
|
412
|
+
call_metadata = @config.rpcs.add_packet_mirroring_rule.metadata.to_h
|
413
|
+
|
414
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
415
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
416
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
417
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
418
|
+
transports_version_send: [:rest]
|
419
|
+
|
420
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
421
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
422
|
+
|
423
|
+
options.apply_defaults timeout: @config.rpcs.add_packet_mirroring_rule.timeout,
|
424
|
+
metadata: call_metadata,
|
425
|
+
retry_policy: @config.rpcs.add_packet_mirroring_rule.retry_policy
|
426
|
+
|
427
|
+
options.apply_defaults timeout: @config.timeout,
|
428
|
+
metadata: @config.metadata,
|
429
|
+
retry_policy: @config.retry_policy
|
430
|
+
|
431
|
+
@network_firewall_policies_stub.add_packet_mirroring_rule request, options do |result, response|
|
432
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
433
|
+
operation: result,
|
434
|
+
client: global_operations,
|
435
|
+
request_values: {
|
436
|
+
"project" => request.project
|
437
|
+
},
|
438
|
+
options: options
|
439
|
+
)
|
440
|
+
yield result, response if block_given?
|
441
|
+
throw :response, result
|
442
|
+
end
|
443
|
+
rescue ::Gapic::Rest::Error => e
|
444
|
+
raise ::Google::Cloud::Error.from_error(e)
|
445
|
+
end
|
446
|
+
|
339
447
|
##
|
340
448
|
# Inserts a rule into a firewall policy.
|
341
449
|
#
|
@@ -955,6 +1063,88 @@ module Google
|
|
955
1063
|
raise ::Google::Cloud::Error.from_error(e)
|
956
1064
|
end
|
957
1065
|
|
1066
|
+
##
|
1067
|
+
# Gets a packet mirroring rule of the specified priority.
|
1068
|
+
#
|
1069
|
+
# @overload get_packet_mirroring_rule(request, options = nil)
|
1070
|
+
# Pass arguments to `get_packet_mirroring_rule` via a request object, either of type
|
1071
|
+
# {::Google::Cloud::Compute::V1::GetPacketMirroringRuleNetworkFirewallPolicyRequest} or an equivalent Hash.
|
1072
|
+
#
|
1073
|
+
# @param request [::Google::Cloud::Compute::V1::GetPacketMirroringRuleNetworkFirewallPolicyRequest, ::Hash]
|
1074
|
+
# A request object representing the call parameters. Required. To specify no
|
1075
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1076
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1077
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1078
|
+
#
|
1079
|
+
# @overload get_packet_mirroring_rule(firewall_policy: nil, priority: nil, project: nil)
|
1080
|
+
# Pass arguments to `get_packet_mirroring_rule` via keyword arguments. Note that at
|
1081
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1082
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1083
|
+
#
|
1084
|
+
# @param firewall_policy [::String]
|
1085
|
+
# Name of the firewall policy to which the queried rule belongs.
|
1086
|
+
# @param priority [::Integer]
|
1087
|
+
# The priority of the rule to get from the firewall policy.
|
1088
|
+
# @param project [::String]
|
1089
|
+
# Project ID for this request.
|
1090
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1091
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::FirewallPolicyRule]
|
1092
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1093
|
+
#
|
1094
|
+
# @return [::Google::Cloud::Compute::V1::FirewallPolicyRule]
|
1095
|
+
#
|
1096
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1097
|
+
#
|
1098
|
+
# @example Basic example
|
1099
|
+
# require "google/cloud/compute/v1"
|
1100
|
+
#
|
1101
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1102
|
+
# client = Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client.new
|
1103
|
+
#
|
1104
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1105
|
+
# request = Google::Cloud::Compute::V1::GetPacketMirroringRuleNetworkFirewallPolicyRequest.new
|
1106
|
+
#
|
1107
|
+
# # Call the get_packet_mirroring_rule method.
|
1108
|
+
# result = client.get_packet_mirroring_rule request
|
1109
|
+
#
|
1110
|
+
# # The returned object is of type Google::Cloud::Compute::V1::FirewallPolicyRule.
|
1111
|
+
# p result
|
1112
|
+
#
|
1113
|
+
def get_packet_mirroring_rule request, options = nil
|
1114
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1115
|
+
|
1116
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetPacketMirroringRuleNetworkFirewallPolicyRequest
|
1117
|
+
|
1118
|
+
# Converts hash and nil to an options object
|
1119
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1120
|
+
|
1121
|
+
# Customize the options with defaults
|
1122
|
+
call_metadata = @config.rpcs.get_packet_mirroring_rule.metadata.to_h
|
1123
|
+
|
1124
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1125
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1126
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1127
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1128
|
+
transports_version_send: [:rest]
|
1129
|
+
|
1130
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1131
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1132
|
+
|
1133
|
+
options.apply_defaults timeout: @config.rpcs.get_packet_mirroring_rule.timeout,
|
1134
|
+
metadata: call_metadata,
|
1135
|
+
retry_policy: @config.rpcs.get_packet_mirroring_rule.retry_policy
|
1136
|
+
|
1137
|
+
options.apply_defaults timeout: @config.timeout,
|
1138
|
+
metadata: @config.metadata,
|
1139
|
+
retry_policy: @config.retry_policy
|
1140
|
+
|
1141
|
+
@network_firewall_policies_stub.get_packet_mirroring_rule request, options do |result, operation|
|
1142
|
+
yield result, operation if block_given?
|
1143
|
+
end
|
1144
|
+
rescue ::Gapic::Rest::Error => e
|
1145
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1146
|
+
end
|
1147
|
+
|
958
1148
|
##
|
959
1149
|
# Gets a rule of the specified priority.
|
960
1150
|
#
|
@@ -1311,6 +1501,101 @@ module Google
|
|
1311
1501
|
raise ::Google::Cloud::Error.from_error(e)
|
1312
1502
|
end
|
1313
1503
|
|
1504
|
+
##
|
1505
|
+
# Patches a packet mirroring rule of the specified priority.
|
1506
|
+
#
|
1507
|
+
# @overload patch_packet_mirroring_rule(request, options = nil)
|
1508
|
+
# Pass arguments to `patch_packet_mirroring_rule` via a request object, either of type
|
1509
|
+
# {::Google::Cloud::Compute::V1::PatchPacketMirroringRuleNetworkFirewallPolicyRequest} or an equivalent Hash.
|
1510
|
+
#
|
1511
|
+
# @param request [::Google::Cloud::Compute::V1::PatchPacketMirroringRuleNetworkFirewallPolicyRequest, ::Hash]
|
1512
|
+
# A request object representing the call parameters. Required. To specify no
|
1513
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1514
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1515
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1516
|
+
#
|
1517
|
+
# @overload patch_packet_mirroring_rule(firewall_policy: nil, firewall_policy_rule_resource: nil, priority: nil, project: nil, request_id: nil)
|
1518
|
+
# Pass arguments to `patch_packet_mirroring_rule` via keyword arguments. Note that at
|
1519
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1520
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1521
|
+
#
|
1522
|
+
# @param firewall_policy [::String]
|
1523
|
+
# Name of the firewall policy to update.
|
1524
|
+
# @param firewall_policy_rule_resource [::Google::Cloud::Compute::V1::FirewallPolicyRule, ::Hash]
|
1525
|
+
# The body resource for this request
|
1526
|
+
# @param priority [::Integer]
|
1527
|
+
# The priority of the rule to patch.
|
1528
|
+
# @param project [::String]
|
1529
|
+
# Project ID for this request.
|
1530
|
+
# @param request_id [::String]
|
1531
|
+
# 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).
|
1532
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1533
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1534
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1535
|
+
#
|
1536
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1537
|
+
#
|
1538
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1539
|
+
#
|
1540
|
+
# @example Basic example
|
1541
|
+
# require "google/cloud/compute/v1"
|
1542
|
+
#
|
1543
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1544
|
+
# client = Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client.new
|
1545
|
+
#
|
1546
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1547
|
+
# request = Google::Cloud::Compute::V1::PatchPacketMirroringRuleNetworkFirewallPolicyRequest.new
|
1548
|
+
#
|
1549
|
+
# # Call the patch_packet_mirroring_rule method.
|
1550
|
+
# result = client.patch_packet_mirroring_rule request
|
1551
|
+
#
|
1552
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
1553
|
+
# p result
|
1554
|
+
#
|
1555
|
+
def patch_packet_mirroring_rule request, options = nil
|
1556
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1557
|
+
|
1558
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchPacketMirroringRuleNetworkFirewallPolicyRequest
|
1559
|
+
|
1560
|
+
# Converts hash and nil to an options object
|
1561
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1562
|
+
|
1563
|
+
# Customize the options with defaults
|
1564
|
+
call_metadata = @config.rpcs.patch_packet_mirroring_rule.metadata.to_h
|
1565
|
+
|
1566
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1567
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1568
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1569
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1570
|
+
transports_version_send: [:rest]
|
1571
|
+
|
1572
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1573
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1574
|
+
|
1575
|
+
options.apply_defaults timeout: @config.rpcs.patch_packet_mirroring_rule.timeout,
|
1576
|
+
metadata: call_metadata,
|
1577
|
+
retry_policy: @config.rpcs.patch_packet_mirroring_rule.retry_policy
|
1578
|
+
|
1579
|
+
options.apply_defaults timeout: @config.timeout,
|
1580
|
+
metadata: @config.metadata,
|
1581
|
+
retry_policy: @config.retry_policy
|
1582
|
+
|
1583
|
+
@network_firewall_policies_stub.patch_packet_mirroring_rule request, options do |result, response|
|
1584
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
1585
|
+
operation: result,
|
1586
|
+
client: global_operations,
|
1587
|
+
request_values: {
|
1588
|
+
"project" => request.project
|
1589
|
+
},
|
1590
|
+
options: options
|
1591
|
+
)
|
1592
|
+
yield result, response if block_given?
|
1593
|
+
throw :response, result
|
1594
|
+
end
|
1595
|
+
rescue ::Gapic::Rest::Error => e
|
1596
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1597
|
+
end
|
1598
|
+
|
1314
1599
|
##
|
1315
1600
|
# Patches a rule of the specified priority.
|
1316
1601
|
#
|
@@ -1499,6 +1784,99 @@ module Google
|
|
1499
1784
|
raise ::Google::Cloud::Error.from_error(e)
|
1500
1785
|
end
|
1501
1786
|
|
1787
|
+
##
|
1788
|
+
# Deletes a packet mirroring rule of the specified priority.
|
1789
|
+
#
|
1790
|
+
# @overload remove_packet_mirroring_rule(request, options = nil)
|
1791
|
+
# Pass arguments to `remove_packet_mirroring_rule` via a request object, either of type
|
1792
|
+
# {::Google::Cloud::Compute::V1::RemovePacketMirroringRuleNetworkFirewallPolicyRequest} or an equivalent Hash.
|
1793
|
+
#
|
1794
|
+
# @param request [::Google::Cloud::Compute::V1::RemovePacketMirroringRuleNetworkFirewallPolicyRequest, ::Hash]
|
1795
|
+
# A request object representing the call parameters. Required. To specify no
|
1796
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1797
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1798
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1799
|
+
#
|
1800
|
+
# @overload remove_packet_mirroring_rule(firewall_policy: nil, priority: nil, project: nil, request_id: nil)
|
1801
|
+
# Pass arguments to `remove_packet_mirroring_rule` via keyword arguments. Note that at
|
1802
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1803
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1804
|
+
#
|
1805
|
+
# @param firewall_policy [::String]
|
1806
|
+
# Name of the firewall policy to update.
|
1807
|
+
# @param priority [::Integer]
|
1808
|
+
# The priority of the rule to remove from the firewall policy.
|
1809
|
+
# @param project [::String]
|
1810
|
+
# Project ID for this request.
|
1811
|
+
# @param request_id [::String]
|
1812
|
+
# 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).
|
1813
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1814
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1815
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1816
|
+
#
|
1817
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1818
|
+
#
|
1819
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1820
|
+
#
|
1821
|
+
# @example Basic example
|
1822
|
+
# require "google/cloud/compute/v1"
|
1823
|
+
#
|
1824
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1825
|
+
# client = Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client.new
|
1826
|
+
#
|
1827
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1828
|
+
# request = Google::Cloud::Compute::V1::RemovePacketMirroringRuleNetworkFirewallPolicyRequest.new
|
1829
|
+
#
|
1830
|
+
# # Call the remove_packet_mirroring_rule method.
|
1831
|
+
# result = client.remove_packet_mirroring_rule request
|
1832
|
+
#
|
1833
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
1834
|
+
# p result
|
1835
|
+
#
|
1836
|
+
def remove_packet_mirroring_rule request, options = nil
|
1837
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1838
|
+
|
1839
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RemovePacketMirroringRuleNetworkFirewallPolicyRequest
|
1840
|
+
|
1841
|
+
# Converts hash and nil to an options object
|
1842
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1843
|
+
|
1844
|
+
# Customize the options with defaults
|
1845
|
+
call_metadata = @config.rpcs.remove_packet_mirroring_rule.metadata.to_h
|
1846
|
+
|
1847
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1848
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1849
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1850
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1851
|
+
transports_version_send: [:rest]
|
1852
|
+
|
1853
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1854
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1855
|
+
|
1856
|
+
options.apply_defaults timeout: @config.rpcs.remove_packet_mirroring_rule.timeout,
|
1857
|
+
metadata: call_metadata,
|
1858
|
+
retry_policy: @config.rpcs.remove_packet_mirroring_rule.retry_policy
|
1859
|
+
|
1860
|
+
options.apply_defaults timeout: @config.timeout,
|
1861
|
+
metadata: @config.metadata,
|
1862
|
+
retry_policy: @config.retry_policy
|
1863
|
+
|
1864
|
+
@network_firewall_policies_stub.remove_packet_mirroring_rule request, options do |result, response|
|
1865
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
1866
|
+
operation: result,
|
1867
|
+
client: global_operations,
|
1868
|
+
request_values: {
|
1869
|
+
"project" => request.project
|
1870
|
+
},
|
1871
|
+
options: options
|
1872
|
+
)
|
1873
|
+
yield result, response if block_given?
|
1874
|
+
throw :response, result
|
1875
|
+
end
|
1876
|
+
rescue ::Gapic::Rest::Error => e
|
1877
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1878
|
+
end
|
1879
|
+
|
1502
1880
|
##
|
1503
1881
|
# Deletes a rule of the specified priority.
|
1504
1882
|
#
|
@@ -1908,6 +2286,11 @@ module Google
|
|
1908
2286
|
#
|
1909
2287
|
attr_reader :add_association
|
1910
2288
|
##
|
2289
|
+
# RPC-specific configuration for `add_packet_mirroring_rule`
|
2290
|
+
# @return [::Gapic::Config::Method]
|
2291
|
+
#
|
2292
|
+
attr_reader :add_packet_mirroring_rule
|
2293
|
+
##
|
1911
2294
|
# RPC-specific configuration for `add_rule`
|
1912
2295
|
# @return [::Gapic::Config::Method]
|
1913
2296
|
#
|
@@ -1943,6 +2326,11 @@ module Google
|
|
1943
2326
|
#
|
1944
2327
|
attr_reader :get_iam_policy
|
1945
2328
|
##
|
2329
|
+
# RPC-specific configuration for `get_packet_mirroring_rule`
|
2330
|
+
# @return [::Gapic::Config::Method]
|
2331
|
+
#
|
2332
|
+
attr_reader :get_packet_mirroring_rule
|
2333
|
+
##
|
1946
2334
|
# RPC-specific configuration for `get_rule`
|
1947
2335
|
# @return [::Gapic::Config::Method]
|
1948
2336
|
#
|
@@ -1963,6 +2351,11 @@ module Google
|
|
1963
2351
|
#
|
1964
2352
|
attr_reader :patch
|
1965
2353
|
##
|
2354
|
+
# RPC-specific configuration for `patch_packet_mirroring_rule`
|
2355
|
+
# @return [::Gapic::Config::Method]
|
2356
|
+
#
|
2357
|
+
attr_reader :patch_packet_mirroring_rule
|
2358
|
+
##
|
1966
2359
|
# RPC-specific configuration for `patch_rule`
|
1967
2360
|
# @return [::Gapic::Config::Method]
|
1968
2361
|
#
|
@@ -1973,6 +2366,11 @@ module Google
|
|
1973
2366
|
#
|
1974
2367
|
attr_reader :remove_association
|
1975
2368
|
##
|
2369
|
+
# RPC-specific configuration for `remove_packet_mirroring_rule`
|
2370
|
+
# @return [::Gapic::Config::Method]
|
2371
|
+
#
|
2372
|
+
attr_reader :remove_packet_mirroring_rule
|
2373
|
+
##
|
1976
2374
|
# RPC-specific configuration for `remove_rule`
|
1977
2375
|
# @return [::Gapic::Config::Method]
|
1978
2376
|
#
|
@@ -1992,6 +2390,8 @@ module Google
|
|
1992
2390
|
def initialize parent_rpcs = nil
|
1993
2391
|
add_association_config = parent_rpcs.add_association if parent_rpcs.respond_to? :add_association
|
1994
2392
|
@add_association = ::Gapic::Config::Method.new add_association_config
|
2393
|
+
add_packet_mirroring_rule_config = parent_rpcs.add_packet_mirroring_rule if parent_rpcs.respond_to? :add_packet_mirroring_rule
|
2394
|
+
@add_packet_mirroring_rule = ::Gapic::Config::Method.new add_packet_mirroring_rule_config
|
1995
2395
|
add_rule_config = parent_rpcs.add_rule if parent_rpcs.respond_to? :add_rule
|
1996
2396
|
@add_rule = ::Gapic::Config::Method.new add_rule_config
|
1997
2397
|
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
@@ -2006,6 +2406,8 @@ module Google
|
|
2006
2406
|
@get_association = ::Gapic::Config::Method.new get_association_config
|
2007
2407
|
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
2008
2408
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
2409
|
+
get_packet_mirroring_rule_config = parent_rpcs.get_packet_mirroring_rule if parent_rpcs.respond_to? :get_packet_mirroring_rule
|
2410
|
+
@get_packet_mirroring_rule = ::Gapic::Config::Method.new get_packet_mirroring_rule_config
|
2009
2411
|
get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule
|
2010
2412
|
@get_rule = ::Gapic::Config::Method.new get_rule_config
|
2011
2413
|
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
@@ -2014,10 +2416,14 @@ module Google
|
|
2014
2416
|
@list = ::Gapic::Config::Method.new list_config
|
2015
2417
|
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
2016
2418
|
@patch = ::Gapic::Config::Method.new patch_config
|
2419
|
+
patch_packet_mirroring_rule_config = parent_rpcs.patch_packet_mirroring_rule if parent_rpcs.respond_to? :patch_packet_mirroring_rule
|
2420
|
+
@patch_packet_mirroring_rule = ::Gapic::Config::Method.new patch_packet_mirroring_rule_config
|
2017
2421
|
patch_rule_config = parent_rpcs.patch_rule if parent_rpcs.respond_to? :patch_rule
|
2018
2422
|
@patch_rule = ::Gapic::Config::Method.new patch_rule_config
|
2019
2423
|
remove_association_config = parent_rpcs.remove_association if parent_rpcs.respond_to? :remove_association
|
2020
2424
|
@remove_association = ::Gapic::Config::Method.new remove_association_config
|
2425
|
+
remove_packet_mirroring_rule_config = parent_rpcs.remove_packet_mirroring_rule if parent_rpcs.respond_to? :remove_packet_mirroring_rule
|
2426
|
+
@remove_packet_mirroring_rule = ::Gapic::Config::Method.new remove_packet_mirroring_rule_config
|
2021
2427
|
remove_rule_config = parent_rpcs.remove_rule if parent_rpcs.respond_to? :remove_rule
|
2022
2428
|
@remove_rule = ::Gapic::Config::Method.new remove_rule_config
|
2023
2429
|
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|