Service to determine the likelihood an event is legitimate. v1
Package
@google-cloud/recaptcha-enterpriseConstructors
(constructor)(opts)
constructor(opts?: ClientOptions);
Construct an instance of RecaptchaEnterpriseServiceClient.
Name | Description |
opts |
ClientOptions
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
recaptchaEnterpriseServiceStub
recaptchaEnterpriseServiceStub?: Promise<{
[name: string]: Function;
}>;
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
annotateAssessment(request, options)
annotateAssessment(request?: protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, (protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | undefined), {} | undefined]>;
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, (protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | undefined), {} | undefined]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [AnnotateAssessmentResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the Assessment, in the format
* "projects/{project}/assessments/{assessment}".
*/
// const name = 'abc123'
/**
* 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.
*/
// const annotation = {}
/**
* Optional. Optional reasons for the annotation that will be assigned to the Event.
*/
// const reasons = 1234
/**
* Optional. 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.
*/
// const hashedAccountId = 'Buffer.from('string')'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callAnnotateAssessment() {
// Construct request
const request = {
name,
};
// Run request
const response = await recaptchaenterpriseClient.annotateAssessment(
request
);
console.log(response);
}
callAnnotateAssessment();
annotateAssessment(request, options, callback)
annotateAssessment(request: protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
annotateAssessment(request, callback)
annotateAssessment(request: protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
assessmentPath(project, assessment)
assessmentPath(project: string, assessment: string): string;
Return a fully-qualified assessment resource name string.
Name | Description |
project |
string
|
assessment |
string
|
Type | Description |
string | {string} Resource name string. |
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
createAssessment(request, options)
createAssessment(request?: protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IAssessment, (protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | undefined), {} | undefined]>;
Creates an Assessment of the likelihood an event is legitimate.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IAssessment, (protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | undefined), {} | undefined]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Assessment]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project in which the assessment will be created,
* in the format "projects/{project}".
*/
// const parent = 'abc123'
/**
* Required. The assessment details.
*/
// const assessment = {}
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callCreateAssessment() {
// Construct request
const request = {
parent,
assessment,
};
// Run request
const response = await recaptchaenterpriseClient.createAssessment(request);
console.log(response);
}
callCreateAssessment();
createAssessment(request, options, callback)
createAssessment(request: protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IAssessment, protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IAssessment, protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createAssessment(request, callback)
createAssessment(request: protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IAssessment, protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IAssessment, protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createKey(request, options)
createKey(request?: protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | undefined, {} | undefined]>;
Creates a new reCAPTCHA Enterprise key.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | undefined, {} | undefined]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Key]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project in which the key will be created, in the
* format "projects/{project}".
*/
// const parent = 'abc123'
/**
* Required. Information to create a reCAPTCHA Enterprise key.
*/
// const key = {}
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callCreateKey() {
// Construct request
const request = {
parent,
key,
};
// Run request
const response = await recaptchaenterpriseClient.createKey(request);
console.log(response);
}
callCreateKey();
createKey(request, options, callback)
createKey(request: protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createKey(request, callback)
createKey(request: protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteKey(request, options)
deleteKey(request?: protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | undefined, {} | undefined]>;
Deletes the specified key.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | undefined, {} | undefined]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the key to be deleted, in the format
* "projects/{project}/keys/{key}".
*/
// const name = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callDeleteKey() {
// Construct request
const request = {
name,
};
// Run request
const response = await recaptchaenterpriseClient.deleteKey(request);
console.log(response);
}
callDeleteKey();
deleteKey(request, options, callback)
deleteKey(request: protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteKey(request, callback)
deleteKey(request: protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getKey(request, options)
getKey(request?: protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | undefined, {} | undefined]>;
Returns the specified key.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | undefined, {} | undefined]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Key]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the requested key, in the format
* "projects/{project}/keys/{key}".
*/
// const name = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callGetKey() {
// Construct request
const request = {
name,
};
// Run request
const response = await recaptchaenterpriseClient.getKey(request);
console.log(response);
}
callGetKey();
getKey(request, options, callback)
getKey(request: protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getKey(request, callback)
getKey(request: protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getMetrics(request, options)
getMetrics(request?: protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | undefined, {} | undefined]>;
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | undefined, {} | undefined]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Metrics]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the requested metrics, in the format
* "projects/{project}/keys/{key}/metrics".
*/
// const name = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callGetMetrics() {
// Construct request
const request = {
name,
};
// Run request
const response = await recaptchaenterpriseClient.getMetrics(request);
console.log(response);
}
callGetMetrics();
getMetrics(request, options, callback)
getMetrics(request: protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getMetrics(request, callback)
getMetrics(request: protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getProjectId()
getProjectId(): Promise<string>;
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Type | Description |
void |
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Type | Description |
Promise<{ [name: string]: Function; }> | {Promise} A promise that resolves to an authenticated service stub. |
keyPath(project, key)
keyPath(project: string, key: string): string;
Return a fully-qualified key resource name string.
Name | Description |
project |
string
|
key |
string
|
Type | Description |
string | {string} Resource name string. |
listKeys(request, options)
listKeys(request?: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey[], protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest | null, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse]>;
Returns the list of all keys that belong to a project.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey[], protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest | null, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [Key]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listKeys(request, options, callback)
listKeys(request: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IKey>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IKey>
|
Type | Description |
void |
listKeys(request, callback)
listKeys(request: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IKey>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IKey>
|
Type | Description |
void |
listKeysAsync(request, options)
listKeysAsync(request?: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IKey>;
Equivalent to listKeys
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IKey> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Key]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project that contains the keys that will be
* listed, in the format "projects/{project}".
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of keys to return. Default is 10. Max limit is
* 1000.
*/
// const pageSize = 1234
/**
* Optional. The next_page_token value returned from a previous.
* ListKeysRequest, if any.
*/
// const pageToken = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callListKeys() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await recaptchaenterpriseClient.listKeysAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListKeys();
listKeysStream(request, options)
listKeysStream(request?: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [Key] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listRelatedAccountGroupMemberships(request, options)
listRelatedAccountGroupMemberships(request?: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership[], protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest | null, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse]>;
Get the memberships in a group of related accounts.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership[], protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest | null, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [RelatedAccountGroupMembership]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listRelatedAccountGroupMemberships(request, options, callback)
listRelatedAccountGroupMemberships(request: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>
|
Type | Description |
void |
listRelatedAccountGroupMemberships(request, callback)
listRelatedAccountGroupMemberships(request: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>
|
Type | Description |
void |
listRelatedAccountGroupMembershipsAsync(request, options)
listRelatedAccountGroupMembershipsAsync(request?: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>;
Equivalent to listRelatedAccountGroupMemberships
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [RelatedAccountGroupMembership]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name for the related account group in the format
* `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of accounts to return. The service may return fewer than
* this value.
* If unspecified, at most 50 accounts will be returned.
* The maximum value is 1000; values above 1000 will be coerced to 1000.
*/
// const pageSize = 1234
/**
* 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.
*/
// const pageToken = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callListRelatedAccountGroupMemberships() {
// Construct request
const request = {
parent,
};
// Run request
const iterable =
await recaptchaenterpriseClient.listRelatedAccountGroupMembershipsAsync(
request
);
for await (const response of iterable) {
console.log(response);
}
}
callListRelatedAccountGroupMemberships();
listRelatedAccountGroupMembershipsStream(request, options)
listRelatedAccountGroupMembershipsStream(request?: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [RelatedAccountGroupMembership] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listRelatedAccountGroups(request, options)
listRelatedAccountGroups(request?: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup[], protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest | null, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse]>;
List groups of related accounts.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup[], protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest | null, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [RelatedAccountGroup]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listRelatedAccountGroups(request, options, callback)
listRelatedAccountGroups(request: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup>
|
Type | Description |
void |
listRelatedAccountGroups(request, callback)
listRelatedAccountGroups(request: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup>
|
Type | Description |
void |
listRelatedAccountGroupsAsync(request, options)
listRelatedAccountGroupsAsync(request?: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup>;
Equivalent to listRelatedAccountGroups
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [RelatedAccountGroup]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project to list related account groups from, in the format
* "projects/{project}".
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of groups to return. The service may return fewer than
* this value.
* If unspecified, at most 50 groups will be returned.
* The maximum value is 1000; values above 1000 will be coerced to 1000.
*/
// const pageSize = 1234
/**
* 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.
*/
// const pageToken = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callListRelatedAccountGroups() {
// Construct request
const request = {
parent,
};
// Run request
const iterable =
await recaptchaenterpriseClient.listRelatedAccountGroupsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListRelatedAccountGroups();
listRelatedAccountGroupsStream(request, options)
listRelatedAccountGroupsStream(request?: protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [RelatedAccountGroup] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
matchAssessmentFromAssessmentName(assessmentName)
matchAssessmentFromAssessmentName(assessmentName: string): string | number;
Parse the assessment from Assessment resource.
Name | Description |
assessmentName |
string
A fully-qualified path representing Assessment resource. |
Type | Description |
string | number | {string} A string representing the assessment. |
matchKeyFromKeyName(keyName)
matchKeyFromKeyName(keyName: string): string | number;
Parse the key from Key resource.
Name | Description |
keyName |
string
A fully-qualified path representing Key resource. |
Type | Description |
string | number | {string} A string representing the key. |
matchKeyFromMetricsName(metricsName)
matchKeyFromMetricsName(metricsName: string): string | number;
Parse the key from Metrics resource.
Name | Description |
metricsName |
string
A fully-qualified path representing Metrics resource. |
Type | Description |
string | number | {string} A string representing the key. |
matchMembershipFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName)
matchMembershipFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName: string): string | number;
Parse the membership from RelatedAccountGroupMembership resource.
Name | Description |
relatedAccountGroupMembershipName |
string
A fully-qualified path representing RelatedAccountGroupMembership resource. |
Type | Description |
string | number | {string} A string representing the membership. |
matchProjectFromAssessmentName(assessmentName)
matchProjectFromAssessmentName(assessmentName: string): string | number;
Parse the project from Assessment resource.
Name | Description |
assessmentName |
string
A fully-qualified path representing Assessment resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromKeyName(keyName)
matchProjectFromKeyName(keyName: string): string | number;
Parse the project from Key resource.
Name | Description |
keyName |
string
A fully-qualified path representing Key resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromMetricsName(metricsName)
matchProjectFromMetricsName(metricsName: string): string | number;
Parse the project from Metrics resource.
Name | Description |
metricsName |
string
A fully-qualified path representing Metrics resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName)
matchProjectFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName: string): string | number;
Parse the project from RelatedAccountGroupMembership resource.
Name | Description |
relatedAccountGroupMembershipName |
string
A fully-qualified path representing RelatedAccountGroupMembership resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRelatedAccountGroupName(relatedAccountGroupName)
matchProjectFromRelatedAccountGroupName(relatedAccountGroupName: string): string | number;
Parse the project from RelatedAccountGroup resource.
Name | Description |
relatedAccountGroupName |
string
A fully-qualified path representing RelatedAccountGroup resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchRelatedaccountgroupFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName)
matchRelatedaccountgroupFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName: string): string | number;
Parse the relatedaccountgroup from RelatedAccountGroupMembership resource.
Name | Description |
relatedAccountGroupMembershipName |
string
A fully-qualified path representing RelatedAccountGroupMembership resource. |
Type | Description |
string | number | {string} A string representing the relatedaccountgroup. |
matchRelatedaccountgroupFromRelatedAccountGroupName(relatedAccountGroupName)
matchRelatedaccountgroupFromRelatedAccountGroupName(relatedAccountGroupName: string): string | number;
Parse the relatedaccountgroup from RelatedAccountGroup resource.
Name | Description |
relatedAccountGroupName |
string
A fully-qualified path representing RelatedAccountGroup resource. |
Type | Description |
string | number | {string} A string representing the relatedaccountgroup. |
metricsPath(project, key)
metricsPath(project: string, key: string): string;
Return a fully-qualified metrics resource name string.
Name | Description |
project |
string
|
key |
string
|
Type | Description |
string | {string} Resource name string. |
migrateKey(request, options)
migrateKey(request?: protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | undefined, {} | undefined]>;
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.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | undefined, {} | undefined]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Key]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the key to be migrated, in the format
* "projects/{project}/keys/{key}".
*/
// const name = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callMigrateKey() {
// Construct request
const request = {
name,
};
// Run request
const response = await recaptchaenterpriseClient.migrateKey(request);
console.log(response);
}
callMigrateKey();
migrateKey(request, options, callback)
migrateKey(request: protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
migrateKey(request, callback)
migrateKey(request: protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Name | Description |
project |
string
|
Type | Description |
string | {string} Resource name string. |
relatedAccountGroupMembershipPath(project, relatedaccountgroup, membership)
relatedAccountGroupMembershipPath(project: string, relatedaccountgroup: string, membership: string): string;
Return a fully-qualified relatedAccountGroupMembership resource name string.
Name | Description |
project |
string
|
relatedaccountgroup |
string
|
membership |
string
|
Type | Description |
string | {string} Resource name string. |
relatedAccountGroupPath(project, relatedaccountgroup)
relatedAccountGroupPath(project: string, relatedaccountgroup: string): string;
Return a fully-qualified relatedAccountGroup resource name string.
Name | Description |
project |
string
|
relatedaccountgroup |
string
|
Type | Description |
string | {string} Resource name string. |
searchRelatedAccountGroupMemberships(request, options)
searchRelatedAccountGroupMemberships(request?: protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership[], protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest | null, protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse]>;
Search group memberships related to a given account.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership[], protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest | null, protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [RelatedAccountGroupMembership]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
searchRelatedAccountGroupMemberships(request, options, callback)
searchRelatedAccountGroupMemberships(request: protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>
|
Type | Description |
void |
searchRelatedAccountGroupMemberships(request, callback)
searchRelatedAccountGroupMemberships(request: protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>
|
Type | Description |
void |
searchRelatedAccountGroupMembershipsAsync(request, options)
searchRelatedAccountGroupMembershipsAsync(request?: protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>;
Equivalent to searchRelatedAccountGroupMemberships
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [RelatedAccountGroupMembership]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project to search related account group memberships from,
* in the format "projects/{project}".
*/
// const parent = 'abc123'
/**
* Optional. The unique stable hashed user identifier we should search connections to.
* The identifier should correspond to a `hashed_account_id` provided in a
* previous CreateAssessment or AnnotateAssessment call.
*/
// const hashedAccountId = 'Buffer.from('string')'
/**
* Optional. The maximum number of groups to return. The service may return fewer than
* this value.
* If unspecified, at most 50 groups will be returned.
* The maximum value is 1000; values above 1000 will be coerced to 1000.
*/
// const pageSize = 1234
/**
* 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.
*/
// const pageToken = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callSearchRelatedAccountGroupMemberships() {
// Construct request
const request = {
parent,
};
// Run request
const iterable =
await recaptchaenterpriseClient.searchRelatedAccountGroupMembershipsAsync(
request
);
for await (const response of iterable) {
console.log(response);
}
}
callSearchRelatedAccountGroupMemberships();
searchRelatedAccountGroupMembershipsStream(request, options)
searchRelatedAccountGroupMembershipsStream(request?: protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [RelatedAccountGroupMembership] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
updateKey(request, options)
updateKey(request?: protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | undefined, {} | undefined]>;
Updates the specified key.
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | undefined, {} | undefined]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Key]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The key to update.
*/
// const key = {}
/**
* Optional. The mask to control which fields of the key get updated. If the mask is not
* present, all fields will be updated.
*/
// const updateMask = {}
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} =
require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callUpdateKey() {
// Construct request
const request = {
key,
};
// Run request
const response = await recaptchaenterpriseClient.updateKey(request);
console.log(response);
}
callUpdateKey();
updateKey(request, options, callback)
updateKey(request: protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
updateKey(request, callback)
updateKey(request: protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |