Reference documentation and code samples for the reCAPTCHA Enterprise V1 API class Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.
Client for the RecaptchaEnterpriseService service.
Service to determine the likelihood an event is legitimate.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the RecaptchaEnterpriseService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all RecaptchaEnterpriseService clients ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config| config.timeout = 10.0 end
#annotate_assessment
def annotate_assessment(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse
def annotate_assessment(name: nil, annotation: nil, reasons: nil, hashed_account_id: 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.
def annotate_assessment(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse
annotate_assessment
via a request object, either of type
AnnotateAssessmentRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def annotate_assessment(name: nil, annotation: nil, reasons: nil, hashed_account_id: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse
annotate_assessment
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}".
- annotation (::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation) — Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.
- reasons (::Array<::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Reason>) — Optional. Optional reasons for the annotation that will be assigned to the Event.
- hashed_account_id (::String) — Optional. Unique stable hashed user identifier to apply to the assessment. This is an alternative to setting the hashed_account_id in CreateAssessment, for example when the account identifier is not yet known in the initial request. It is recommended that the identifier is hashed using hmac-sha256 with stable secret.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new # Call the annotate_assessment method. result = client.annotate_assessment request # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse. p result
#configure
def 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 Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_assessment
def create_assessment(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Assessment
def create_assessment(parent: nil, assessment: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Assessment
Creates an Assessment of the likelihood an event is legitimate.
def create_assessment(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Assessment
create_assessment
via a request object, either of type
CreateAssessmentRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_assessment(parent: nil, assessment: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Assessment
create_assessment
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The name of the project in which the assessment will be created, in the format "projects/{project}".
- assessment (::Google::Cloud::RecaptchaEnterprise::V1::Assessment, ::Hash) — Required. The assessment details.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::RecaptchaEnterprise::V1::Assessment)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new # Call the create_assessment method. result = client.create_assessment request # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Assessment. p result
#create_key
def create_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
def create_key(parent: nil, key: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
Creates a new reCAPTCHA Enterprise key.
def create_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
create_key
via a request object, either of type
CreateKeyRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_key(parent: nil, key: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
create_key
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The name of the project in which the key will be created, in the format "projects/{project}".
- key (::Google::Cloud::RecaptchaEnterprise::V1::Key, ::Hash) — Required. Information to create a reCAPTCHA Enterprise key.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::RecaptchaEnterprise::V1::Key)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new # Call the create_key method. result = client.create_key request # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. p result
#delete_key
def delete_key(request, options = nil) -> ::Google::Protobuf::Empty
def delete_key(name: nil) -> ::Google::Protobuf::Empty
Deletes the specified key.
def delete_key(request, options = nil) -> ::Google::Protobuf::Empty
delete_key
via a request object, either of type
DeleteKeyRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_key(name: nil) -> ::Google::Protobuf::Empty
delete_key
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the key to be deleted, in the format "projects/{project}/keys/{key}".
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.new # Call the delete_key method. result = client.delete_key request # The returned object is of type Google::Protobuf::Empty. p result
#get_key
def get_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
def get_key(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
Returns the specified key.
def get_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
get_key
via a request object, either of type
GetKeyRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_key(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
get_key
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the requested key, in the format "projects/{project}/keys/{key}".
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::RecaptchaEnterprise::V1::Key)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.new # Call the get_key method. result = client.get_key request # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. p result
#get_metrics
def get_metrics(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Metrics
def get_metrics(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Metrics
Get some aggregated metrics for a Key. This data can be used to build dashboards.
def get_metrics(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Metrics
get_metrics
via a request object, either of type
GetMetricsRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_metrics(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Metrics
get_metrics
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics".
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::RecaptchaEnterprise::V1::Metrics)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.new # Call the get_metrics method. result = client.get_metrics request # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Metrics. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new RecaptchaEnterpriseService client object.
- (config) — Configure the RecaptchaEnterpriseService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config| config.timeout = 10.0 end
#list_keys
def list_keys(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>
def 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.
def list_keys(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>
list_keys
via a request object, either of type
ListKeysRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_keys(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>
list_keys
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The name of the project that contains the keys that will be listed, in the format "projects/{project}".
- page_size (::Integer) — Optional. The maximum number of keys to return. Default is 10. Max limit is 1000.
- page_token (::String) — Optional. The next_page_token value returned from a previous. ListKeysRequest, if any.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::Key>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new # Call the list_keys method. result = client.list_keys request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::RecaptchaEnterprise::V1::Key. p response end
#list_related_account_group_memberships
def list_related_account_group_memberships(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
def 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.
def list_related_account_group_memberships(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
list_related_account_group_memberships
via a request object, either of type
ListRelatedAccountGroupMembershipsRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_related_account_group_memberships(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
list_related_account_group_memberships
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name for the related account group in the format
projects/{project}/relatedaccountgroups/{relatedaccountgroup}
. - page_size (::Integer) — Optional. The maximum number of accounts to return. The service might return fewer than this value. If unspecified, at most 50 accounts are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
-
page_token (::String) — Optional. A page token, received from a previous
ListRelatedAccountGroupMemberships
call.When paginating, all other parameters provided to
ListRelatedAccountGroupMemberships
must match the call that provided the page token.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new # Call the list_related_account_group_memberships method. result = client.list_related_account_group_memberships request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. p response end
#list_related_account_groups
def list_related_account_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>
def list_related_account_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>
List groups of related accounts.
def list_related_account_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>
list_related_account_groups
via a request object, either of type
ListRelatedAccountGroupsRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_related_account_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>
list_related_account_groups
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. The name of the project to list related account groups from, in the format "projects/{project}".
- page_size (::Integer) — Optional. The maximum number of groups to return. The service might return fewer than this value. If unspecified, at most 50 groups are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
-
page_token (::String) — Optional. A page token, received from a previous
ListRelatedAccountGroups
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListRelatedAccountGroups
must match the call that provided the page token.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new # Call the list_related_account_groups method. result = client.list_related_account_groups request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup. p response end
#migrate_key
def migrate_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
def migrate_key(name: 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 Site Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
def migrate_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
migrate_key
via a request object, either of type
MigrateKeyRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def migrate_key(name: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
migrate_key
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the key to be migrated, in the format "projects/{project}/keys/{key}".
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::RecaptchaEnterprise::V1::Key)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new # Call the migrate_key method. result = client.migrate_key request # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. p result
#retrieve_legacy_secret_key
def retrieve_legacy_secret_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse
def 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.
def retrieve_legacy_secret_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse
retrieve_legacy_secret_key
via a request object, either of type
Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def retrieve_legacy_secret_key(key: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse
retrieve_legacy_secret_key
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- key (::String) — Required. The public key name linked to the requested secret key in the format "projects/{project}/keys/{key}".
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyRequest.new # Call the retrieve_legacy_secret_key method. result = client.retrieve_legacy_secret_key request # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::RetrieveLegacySecretKeyResponse. p result
#search_related_account_group_memberships
def search_related_account_group_memberships(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
def search_related_account_group_memberships(project: 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.
def search_related_account_group_memberships(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
search_related_account_group_memberships
via a request object, either of type
SearchRelatedAccountGroupMembershipsRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_related_account_group_memberships(project: nil, hashed_account_id: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>
search_related_account_group_memberships
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project (::String) — Required. The name of the project to search related account group memberships from. Specify the project name in the following format: "projects/{project}".
-
hashed_account_id (::String) — Optional. The unique stable hashed user identifier we should search connections to.
The identifier should correspond to a
hashed_account_id
provided in a previousCreateAssessment
orAnnotateAssessment
call. - page_size (::Integer) — Optional. The maximum number of groups to return. The service might return fewer than this value. If unspecified, at most 50 groups are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
-
page_token (::String) — Optional. A page token, received from a previous
SearchRelatedAccountGroupMemberships
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
SearchRelatedAccountGroupMemberships
must match the call that provided the page token.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new # Call the search_related_account_group_memberships method. result = client.search_related_account_group_memberships request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership. p response end
#update_key
def update_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
def update_key(key: nil, update_mask: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
Updates the specified key.
def update_key(request, options = nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
update_key
via a request object, either of type
UpdateKeyRequest or an equivalent Hash.
- request (::Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_key(key: nil, update_mask: nil) -> ::Google::Cloud::RecaptchaEnterprise::V1::Key
update_key
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- key (::Google::Cloud::RecaptchaEnterprise::V1::Key, ::Hash) — Required. The key to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The mask to control which fields of the key get updated. If the mask is not present, all fields will be updated.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::RecaptchaEnterprise::V1::Key)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/recaptcha_enterprise/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new # Call the update_key method. result = client.update_key request # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key. p result