Class: Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client
- Inherits:
-
Object
- Object
- Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb
Overview
Client for the RecaptchaEnterpriseService service.
Service to determine the likelihood an event is legitimate.
Defined Under Namespace
Classes: Configuration
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the RecaptchaEnterpriseService Client class.
Instance Method Summary collapse
-
#add_ip_override(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse
Adds an IP override to a key.
-
#annotate_assessment(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the RecaptchaEnterpriseService Client instance.
-
#create_assessment(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Assessment
Creates an Assessment of the likelihood an event is legitimate.
-
#create_firewall_policy(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy
Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA Enterprise actions can be executed.
-
#create_key(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key
Creates a new reCAPTCHA Enterprise key.
-
#delete_firewall_policy(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes the specified firewall policy.
-
#delete_key(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes the specified key.
-
#get_firewall_policy(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy
Returns the specified firewall policy.
-
#get_key(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key
Returns the specified key.
-
#get_metrics(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Metrics
Get some aggregated metrics for a Key.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new RecaptchaEnterpriseService client object.
-
#list_firewall_policies(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>
Returns the list of all firewall policies that belong to a project.
-
#list_ip_overrides(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>
Lists all IP overrides for a key.
-
#list_keys(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>
Returns the list of all keys that belong to a project.
-
#list_related_account_group_memberships(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
Get memberships in a group of related accounts.
-
#list_related_account_groups(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>
List groups of related accounts.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#migrate_key(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key
Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise.
-
#remove_ip_override(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse
Removes an IP override from a key.
-
#reorder_firewall_policies(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse
Reorders all firewall policies.
-
#retrieve_legacy_secret_key(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse
Returns the secret key related to the specified public key.
-
#search_related_account_group_memberships(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
Search group memberships related to a given account.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_firewall_policy(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy
Updates the specified firewall policy.
-
#update_key(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key
Updates the specified key.
Methods included from Paths
#assessment_path, #firewall_policy_path, #key_path, #metrics_path, #project_path, #related_account_group_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new RecaptchaEnterpriseService client object.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 138 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @recaptcha_enterprise_service_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool, logger: @config.logger ) @recaptcha_enterprise_service_stub.stub_logger&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the RecaptchaEnterpriseService Client class.
See Configuration for a description of the configuration fields.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 62 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "RecaptchaEnterprise", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.create_assessment.timeout = 600.0 default_config.rpcs.annotate_assessment.timeout = 600.0 default_config.rpcs.create_key.timeout = 600.0 default_config.rpcs.list_keys.timeout = 600.0 default_config.rpcs.get_key.timeout = 600.0 default_config.rpcs.update_key.timeout = 600.0 default_config.rpcs.delete_key.timeout = 600.0 default_config end yield @configure if block_given? @configure end |
Instance Method Details
#add_ip_override(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse #add_ip_override(name: nil, ip_override_data: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideResponse
Adds an IP override to a key. The following restrictions hold:
- The maximum number of IP overrides per key is 100.
- For any conflict (such as IP already exists or IP part of an existing IP range), an error is returned.
1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1077 def add_ip_override request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::AddIpOverrideRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.add_ip_override..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.add_ip_override.timeout, metadata: , retry_policy: @config.rpcs.add_ip_override.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :add_ip_override, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#annotate_assessment(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse #annotate_assessment(name: nil, annotation: nil, reasons: nil, account_id: nil, hashed_account_id: nil, transaction_event: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 352 def annotate_assessment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.annotate_assessment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.annotate_assessment.timeout, metadata: , retry_policy: @config.rpcs.annotate_assessment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :annotate_assessment, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#configure {|config| ... } ⇒ Client::Configuration
Configure the RecaptchaEnterpriseService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
108 109 110 111 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 108 def configure yield @config if block_given? @config end |
#create_assessment(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Assessment #create_assessment(parent: nil, assessment: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Assessment
Creates an Assessment of the likelihood an event is legitimate.
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 247 def create_assessment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_assessment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_assessment.timeout, metadata: , retry_policy: @config.rpcs.create_assessment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :create_assessment, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_firewall_policy(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy #create_firewall_policy(parent: nil, firewall_policy: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy
Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA Enterprise actions can be executed. A project may have a maximum of 1000 policies.
1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1446 def create_firewall_policy request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::CreateFirewallPolicyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_firewall_policy..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_firewall_policy.timeout, metadata: , retry_policy: @config.rpcs.create_firewall_policy.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :create_firewall_policy, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_key(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key #create_key(parent: nil, key: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key
Creates a new reCAPTCHA Enterprise key.
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 440 def create_key request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_key..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_key.timeout, metadata: , retry_policy: @config.rpcs.create_key.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :create_key, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_firewall_policy(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_firewall_policy(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes the specified firewall policy.
1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1804 def delete_firewall_policy request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::DeleteFirewallPolicyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_firewall_policy..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_firewall_policy.timeout, metadata: , retry_policy: @config.rpcs.delete_firewall_policy.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :delete_firewall_policy, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_key(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_key(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes the specified key.
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 886 def delete_key request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_key..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_key.timeout, metadata: , retry_policy: @config.rpcs.delete_key.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :delete_key, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_firewall_policy(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy #get_firewall_policy(name: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy
Returns the specified firewall policy.
1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1630 def get_firewall_policy request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetFirewallPolicyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_firewall_policy..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_firewall_policy.timeout, metadata: , retry_policy: @config.rpcs.get_firewall_policy.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :get_firewall_policy, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_key(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key #get_key(name: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key
Returns the specified key.
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 712 def get_key request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_key..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_key.timeout, metadata: , retry_policy: @config.rpcs.get_key.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :get_key, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_metrics(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Metrics #get_metrics(name: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Metrics
Get some aggregated metrics for a Key. This data can be used to build dashboards.
1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1356 def get_metrics request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_metrics..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_metrics.timeout, metadata: , retry_policy: @config.rpcs.get_metrics.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :get_metrics, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_firewall_policies(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy> #list_firewall_policies(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy>
Returns the list of all firewall policies that belong to a project.
1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1542 def list_firewall_policies request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListFirewallPoliciesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_firewall_policies..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_firewall_policies.timeout, metadata: , retry_policy: @config.rpcs.list_firewall_policies.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :list_firewall_policies, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_firewall_policies, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_ip_overrides(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData> #list_ip_overrides(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::IpOverrideData>
Lists all IP overrides for a key.
1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1267 def list_ip_overrides request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListIpOverridesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_ip_overrides..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_ip_overrides.timeout, metadata: , retry_policy: @config.rpcs.list_ip_overrides.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :list_ip_overrides, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_ip_overrides, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_keys(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key> #list_keys(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>
Returns the list of all keys that belong to a project.
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 536 def list_keys request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_keys..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_keys.timeout, metadata: , retry_policy: @config.rpcs.list_keys.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :list_keys, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_keys, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_related_account_group_memberships(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership> #list_related_account_group_memberships(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
Get memberships in a group of related accounts.
2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 2097 def request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs...to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs..timeout, metadata: , retry_policy: @config.rpcs..retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :list_related_account_group_memberships, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_group_memberships, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_related_account_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup> #list_related_account_groups(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>
List groups of related accounts.
1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1994 def request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs...to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs..timeout, metadata: , retry_policy: @config.rpcs..retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :list_related_account_groups, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_groups, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
194 195 196 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 194 def logger @recaptcha_enterprise_service_stub.logger end |
#migrate_key(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key #migrate_key(name: nil, skip_billing_check: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key
Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 986 def migrate_key request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.migrate_key..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.migrate_key.timeout, metadata: , retry_policy: @config.rpcs.migrate_key.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :migrate_key, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#remove_ip_override(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse #remove_ip_override(name: nil, ip_override_data: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideResponse
Removes an IP override from a key. The following restrictions hold:
- If the IP isn't found in an existing IP override, a
NOT_FOUND
error is returned. - If the IP is found in an existing IP override, but the
override type does not match, a
NOT_FOUND
error is returned.
1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1169 def remove_ip_override request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::RemoveIpOverrideRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.remove_ip_override..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.remove_ip_override.timeout, metadata: , retry_policy: @config.rpcs.remove_ip_override.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :remove_ip_override, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#reorder_firewall_policies(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse #reorder_firewall_policies(parent: nil, names: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesResponse
Reorders all firewall policies.
1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1893 def reorder_firewall_policies request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ReorderFirewallPoliciesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.reorder_firewall_policies..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.reorder_firewall_policies.timeout, metadata: , retry_policy: @config.rpcs.reorder_firewall_policies.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :reorder_firewall_policies, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#retrieve_legacy_secret_key(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse #retrieve_legacy_secret_key(key: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 626 def retrieve_legacy_secret_key request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.retrieve_legacy_secret_key..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.key header_params["key"] = request.key end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.retrieve_legacy_secret_key.timeout, metadata: , retry_policy: @config.rpcs.retrieve_legacy_secret_key.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :retrieve_legacy_secret_key, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#search_related_account_group_memberships(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership> #search_related_account_group_memberships(project: nil, account_id: nil, hashed_account_id: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
Search group memberships related to a given account.
2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 2213 def request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs...to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.project header_params["project"] = request.project end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs..timeout, metadata: , retry_policy: @config.rpcs..retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :search_related_account_group_memberships, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :search_related_account_group_memberships, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
118 119 120 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 118 def universe_domain @recaptcha_enterprise_service_stub.universe_domain end |
#update_firewall_policy(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy #update_firewall_policy(firewall_policy: nil, update_mask: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::FirewallPolicy
Updates the specified firewall policy.
1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1718 def update_firewall_policy request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::UpdateFirewallPolicyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_firewall_policy..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.firewall_policy&.name header_params["firewall_policy.name"] = request.firewall_policy.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_firewall_policy.timeout, metadata: , retry_policy: @config.rpcs.update_firewall_policy.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :update_firewall_policy, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_key(request, options = nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key #update_key(key: nil, update_mask: nil) ⇒ ::Google::Cloud::RecaptchaEnterprise::V1::Key
Updates the specified key.
800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 800 def update_key request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_key..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.key&.name header_params["key.name"] = request.key.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_key.timeout, metadata: , retry_policy: @config.rpcs.update_key.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @recaptcha_enterprise_service_stub.call_rpc :update_key, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |