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.
-
#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 |
# 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 ) 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.
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1065 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? return response 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.
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 333 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? return response 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.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 227 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? return response 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.
1437 1438 1439 1440 1441 1442 1443 1444 1445 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1437 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? return response 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.
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 422 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? return response 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.
1798 1799 1800 1801 1802 1803 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1798 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? return response 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.
872 873 874 875 876 877 878 879 880 881 882 883 884 885 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 872 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? return response 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.
1622 1623 1624 1625 1626 1627 1628 1629 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1622 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? return response 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.
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 696 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? return response 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.
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1346 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? return response 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.
1534 1535 1536 1537 1538 1539 1540 1541 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1534 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? return 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.
1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1257 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? return 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.
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 519 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? return 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.
2093 2094 2095 2096 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 2093 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? return 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.
1990 1991 1992 1993 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1990 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? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) 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.
973 974 975 976 977 978 979 980 981 982 983 984 985 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 973 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? return response 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.
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1158 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? return response 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.
1888 1889 1890 1891 1892 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1888 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? return response 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.
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 609 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? return response 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.
2209 2210 2211 2212 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 2209 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? return 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.
1711 1712 1713 1714 1715 1716 1717 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 1711 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? return response 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.
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 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 |
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb', line 785 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? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |