Service to determine the likelihood an event is legitimate. v1
Package
@google-cloud/recaptcha-enterpriseConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of RecaptchaEnterpriseServiceClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
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.
Parameters | |
---|---|
Name | Description |
request |
IAnnotateAssessmentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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. Reasons for the annotation that are assigned to the event.
*/
// const reasons = [1,2,3,4]
/**
* Optional. A stable account identifier to apply to the assessment. This is
* an alternative to setting `account_id` in `CreateAssessment`, for example
* when a stable account identifier is not yet known in the initial request.
*/
// const accountId = 'abc123'
/**
* Optional. A stable hashed account identifier to apply to the assessment.
* This is an alternative to setting `hashed_account_id` in
* `CreateAssessment`, for example when a stable account identifier is not yet
* known in the initial request.
*/
// const hashedAccountId = Buffer.from('string')
/**
* Optional. If the assessment is part of a payment transaction, provide
* details on payment lifecycle events that occur in the transaction.
*/
// const transactionEvent = {}
// 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;
Parameters | |
---|---|
Name | Description |
request |
IAnnotateAssessmentRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
IAnnotateAssessmentRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
assessmentPath(project, assessment)
assessmentPath(project: string, assessment: string): string;
Return a fully-qualified assessment resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
assessment |
string
|
Returns | |
---|---|
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.
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
ICreateAssessmentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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;
Parameters | |
---|---|
Name | Description |
request |
ICreateAssessmentRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IAssessment, protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
ICreateAssessmentRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IAssessment, protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createFirewallPolicy(request, options)
createFirewallPolicy(request?: protos.google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest, options?: CallOptions): Promise<[
protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy,
(protos.google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest | undefined),
{} | undefined
]>;
Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA Enterprise actions can be executed. A project may have a maximum of 1000 policies.
Parameters | |
---|---|
Name | Description |
request |
ICreateFirewallPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy,
(protos.google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing FirewallPolicy. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project this policy will apply to, in the format
* `projects/{project}`.
*/
// const parent = 'abc123'
/**
* Required. Information to create the policy.
*/
// const firewallPolicy = {}
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} = require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callCreateFirewallPolicy() {
// Construct request
const request = {
parent,
firewallPolicy,
};
// Run request
const response = await recaptchaenterpriseClient.createFirewallPolicy(request);
console.log(response);
}
callCreateFirewallPolicy();
createFirewallPolicy(request, options, callback)
createFirewallPolicy(request: protos.google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateFirewallPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createFirewallPolicy(request, callback)
createFirewallPolicy(request: protos.google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateFirewallPolicyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
ICreateKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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;
Parameters | |
---|---|
Name | Description |
request |
ICreateKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
ICreateKeyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteFirewallPolicy(request, options)
deleteFirewallPolicy(request?: protos.google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest | undefined),
{} | undefined
]>;
Deletes the specified firewall policy.
Parameters | |
---|---|
Name | Description |
request |
IDeleteFirewallPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest | 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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the policy to be deleted, in the format
* `projects/{project}/firewallpolicies/{firewallpolicy}`.
*/
// const name = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} = require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callDeleteFirewallPolicy() {
// Construct request
const request = {
name,
};
// Run request
const response = await recaptchaenterpriseClient.deleteFirewallPolicy(request);
console.log(response);
}
callDeleteFirewallPolicy();
deleteFirewallPolicy(request, options, callback)
deleteFirewallPolicy(request: protos.google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteFirewallPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteFirewallPolicy(request, callback)
deleteFirewallPolicy(request: protos.google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteFirewallPolicyRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
IDeleteKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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;
Parameters | |
---|---|
Name | Description |
request |
IDeleteKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
IDeleteKeyRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
firewallPolicyPath(project, firewallpolicy)
firewallPolicyPath(project: string, firewallpolicy: string): string;
Return a fully-qualified firewallPolicy resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
firewallpolicy |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
getFirewallPolicy(request, options)
getFirewallPolicy(request?: protos.google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest, options?: CallOptions): Promise<[
protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy,
(protos.google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest | undefined),
{} | undefined
]>;
Returns the specified firewall policy.
Parameters | |
---|---|
Name | Description |
request |
IGetFirewallPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy,
(protos.google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing FirewallPolicy. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the requested policy, in the format
* `projects/{project}/firewallpolicies/{firewallpolicy}`.
*/
// const name = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} = require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callGetFirewallPolicy() {
// Construct request
const request = {
name,
};
// Run request
const response = await recaptchaenterpriseClient.getFirewallPolicy(request);
console.log(response);
}
callGetFirewallPolicy();
getFirewallPolicy(request, options, callback)
getFirewallPolicy(request: protos.google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetFirewallPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getFirewallPolicy(request, callback)
getFirewallPolicy(request: protos.google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetFirewallPolicyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
IGetKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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;
Parameters | |
---|---|
Name | Description |
request |
IGetKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
IGetKeyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
IGetMetricsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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;
Parameters | |
---|---|
Name | Description |
request |
IGetMetricsRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
IGetMetricsRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
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.
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
project |
string
|
key |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
listFirewallPolicies(request, options)
listFirewallPolicies(request?: protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, options?: CallOptions): Promise<[
protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy[],
protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest | null,
protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesResponse
]>;
Returns the list of all firewall policies that belong to a project.
Parameters | |
---|---|
Name | Description |
request |
IListFirewallPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy[],
protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest | null,
protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of FirewallPolicy. 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 |
listFirewallPolicies(request, options, callback)
listFirewallPolicies(request: protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy>): void;
Parameters | |
---|---|
Name | Description |
request |
IListFirewallPoliciesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy>
|
Returns | |
---|---|
Type | Description |
void |
listFirewallPolicies(request, callback)
listFirewallPolicies(request: protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy>): void;
Parameters | |
---|---|
Name | Description |
request |
IListFirewallPoliciesRequest
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy>
|
Returns | |
---|---|
Type | Description |
void |
listFirewallPoliciesAsync(request, options)
listFirewallPoliciesAsync(request?: protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy>;
Equivalent to listFirewallPolicies
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListFirewallPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing FirewallPolicy. 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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project to list the policies for, in the format
* `projects/{project}`.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of policies to return. Default is 10. Max
* limit is 1000.
*/
// const pageSize = 1234
/**
* Optional. The next_page_token value returned from a previous.
* ListFirewallPoliciesRequest, 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 callListFirewallPolicies() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await recaptchaenterpriseClient.listFirewallPoliciesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListFirewallPolicies();
listFirewallPoliciesStream(request, options)
listFirewallPoliciesStream(request?: protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListFirewallPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing FirewallPolicy 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 |
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.
Parameters | |
---|---|
Name | Description |
request |
IListKeysRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
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>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
IListKeysRequest
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IKey>
|
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
IListKeysRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IKey> | {Object} An iterable Object that allows async iteration. 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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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.
Parameters | |
---|---|
Name | Description |
request |
IListKeysRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 memberships in a group of related accounts.
Parameters | |
---|---|
Name | Description |
request |
IListRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
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>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
IListRelatedAccountGroupMembershipsRequest
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>
|
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
IListRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership> | {Object} An iterable Object that allows async iteration. 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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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 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.
*/
// 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.
Parameters | |
---|---|
Name | Description |
request |
IListRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
IListRelatedAccountGroupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
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>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
IListRelatedAccountGroupsRequest
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup>
|
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
IListRelatedAccountGroupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup> | {Object} An iterable Object that allows async iteration. 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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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 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.
*/
// 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.
Parameters | |
---|---|
Name | Description |
request |
IListRelatedAccountGroupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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.
Parameter | |
---|---|
Name | Description |
assessmentName |
string
A fully-qualified path representing Assessment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the assessment. |
matchFirewallpolicyFromFirewallPolicyName(firewallPolicyName)
matchFirewallpolicyFromFirewallPolicyName(firewallPolicyName: string): string | number;
Parse the firewallpolicy from FirewallPolicy resource.
Parameter | |
---|---|
Name | Description |
firewallPolicyName |
string
A fully-qualified path representing FirewallPolicy resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the firewallpolicy. |
matchKeyFromKeyName(keyName)
matchKeyFromKeyName(keyName: string): string | number;
Parse the key from Key resource.
Parameter | |
---|---|
Name | Description |
keyName |
string
A fully-qualified path representing Key resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the key. |
matchKeyFromMetricsName(metricsName)
matchKeyFromMetricsName(metricsName: string): string | number;
Parse the key from Metrics resource.
Parameter | |
---|---|
Name | Description |
metricsName |
string
A fully-qualified path representing Metrics resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the key. |
matchMembershipFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName)
matchMembershipFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName: string): string | number;
Parse the membership from RelatedAccountGroupMembership resource.
Parameter | |
---|---|
Name | Description |
relatedAccountGroupMembershipName |
string
A fully-qualified path representing RelatedAccountGroupMembership resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the membership. |
matchProjectFromAssessmentName(assessmentName)
matchProjectFromAssessmentName(assessmentName: string): string | number;
Parse the project from Assessment resource.
Parameter | |
---|---|
Name | Description |
assessmentName |
string
A fully-qualified path representing Assessment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromFirewallPolicyName(firewallPolicyName)
matchProjectFromFirewallPolicyName(firewallPolicyName: string): string | number;
Parse the project from FirewallPolicy resource.
Parameter | |
---|---|
Name | Description |
firewallPolicyName |
string
A fully-qualified path representing FirewallPolicy resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromKeyName(keyName)
matchProjectFromKeyName(keyName: string): string | number;
Parse the project from Key resource.
Parameter | |
---|---|
Name | Description |
keyName |
string
A fully-qualified path representing Key resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromMetricsName(metricsName)
matchProjectFromMetricsName(metricsName: string): string | number;
Parse the project from Metrics resource.
Parameter | |
---|---|
Name | Description |
metricsName |
string
A fully-qualified path representing Metrics resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Parameter | |
---|---|
Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName)
matchProjectFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName: string): string | number;
Parse the project from RelatedAccountGroupMembership resource.
Parameter | |
---|---|
Name | Description |
relatedAccountGroupMembershipName |
string
A fully-qualified path representing RelatedAccountGroupMembership resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRelatedAccountGroupName(relatedAccountGroupName)
matchProjectFromRelatedAccountGroupName(relatedAccountGroupName: string): string | number;
Parse the project from RelatedAccountGroup resource.
Parameter | |
---|---|
Name | Description |
relatedAccountGroupName |
string
A fully-qualified path representing RelatedAccountGroup resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchRelatedaccountgroupFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName)
matchRelatedaccountgroupFromRelatedAccountGroupMembershipName(relatedAccountGroupMembershipName: string): string | number;
Parse the relatedaccountgroup from RelatedAccountGroupMembership resource.
Parameter | |
---|---|
Name | Description |
relatedAccountGroupMembershipName |
string
A fully-qualified path representing RelatedAccountGroupMembership resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the relatedaccountgroup. |
matchRelatedaccountgroupFromRelatedAccountGroupName(relatedAccountGroupName)
matchRelatedaccountgroupFromRelatedAccountGroupName(relatedAccountGroupName: string): string | number;
Parse the relatedaccountgroup from RelatedAccountGroup resource.
Parameter | |
---|---|
Name | Description |
relatedAccountGroupName |
string
A fully-qualified path representing RelatedAccountGroup resource. |
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
project |
string
|
key |
string
|
Returns | |
---|---|
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 Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
Parameters | |
---|---|
Name | Description |
request |
IMigrateKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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'
/**
* Optional. If true, skips the billing check.
* A reCAPTCHA Enterprise key or migrated key behaves differently than a
* reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see
* https://cloud.google.com/recaptcha-enterprise/quotas#quota_limit). To avoid
* any disruption of your usage, we check that a billing account is present.
* If your usage of reCAPTCHA is under the free quota, you can safely skip the
* billing check and proceed with the migration. See
* https://cloud.google.com/recaptcha-enterprise/docs/billing-information.
*/
// const skipBillingCheck = true
// 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;
Parameters | |
---|---|
Name | Description |
request |
IMigrateKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
IMigrateKeyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
project |
string
|
relatedaccountgroup |
string
|
membership |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
relatedAccountGroupPath(project, relatedaccountgroup)
relatedAccountGroupPath(project: string, relatedaccountgroup: string): string;
Return a fully-qualified relatedAccountGroup resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
relatedaccountgroup |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
retrieveLegacySecretKey(request, options)
retrieveLegacySecretKey(request?: protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest, options?: CallOptions): Promise<[
protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse,
(protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest | undefined),
{} | undefined
]>;
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.
Parameters | |
---|---|
Name | Description |
request |
IRetrieveLegacySecretKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse,
(protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing RetrieveLegacySecretKeyResponse. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The public key name linked to the requested secret key in the
* format `projects/{project}/keys/{key}`.
*/
// const key = 'abc123'
// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} = require('@google-cloud/recaptcha-enterprise').v1;
// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();
async function callRetrieveLegacySecretKey() {
// Construct request
const request = {
key,
};
// Run request
const response = await recaptchaenterpriseClient.retrieveLegacySecretKey(request);
console.log(response);
}
callRetrieveLegacySecretKey();
retrieveLegacySecretKey(request, options, callback)
retrieveLegacySecretKey(request: protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse, protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IRetrieveLegacySecretKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse, protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
retrieveLegacySecretKey(request, callback)
retrieveLegacySecretKey(request: protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse, protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IRetrieveLegacySecretKeyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse, protos.google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
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.
Parameters | |
---|---|
Name | Description |
request |
ISearchRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
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>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
ISearchRelatedAccountGroupMembershipsRequest
|
callback |
PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership>
|
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
request |
ISearchRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership> | {Object} An iterable Object that allows async iteration. 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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project to search related account group
* memberships from. Specify the project name in the following format:
* `projects/{project}`.
*/
// const project = 'my-project'
/**
* Optional. The unique stable account identifier used to search connections.
* The identifier should correspond to an `account_id` provided in a previous
* `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id
* or account_id must be set, but not both.
*/
// const accountId = 'abc123'
/**
* 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.
*/
// 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 = {
project,
};
// 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.
Parameters | |
---|---|
Name | Description |
request |
ISearchRelatedAccountGroupMembershipsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 |
updateFirewallPolicy(request, options)
updateFirewallPolicy(request?: protos.google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest, options?: CallOptions): Promise<[
protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy,
(protos.google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest | undefined),
{} | undefined
]>;
Updates the specified firewall policy.
Parameters | |
---|---|
Name | Description |
request |
IUpdateFirewallPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy,
(protos.google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing FirewallPolicy. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The policy to update.
*/
// const firewallPolicy = {}
/**
* Optional. The mask to control which fields of the policy 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 callUpdateFirewallPolicy() {
// Construct request
const request = {
firewallPolicy,
};
// Run request
const response = await recaptchaenterpriseClient.updateFirewallPolicy(request);
console.log(response);
}
callUpdateFirewallPolicy();
updateFirewallPolicy(request, options, callback)
updateFirewallPolicy(request: protos.google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateFirewallPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateFirewallPolicy(request, callback)
updateFirewallPolicy(request: protos.google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateFirewallPolicyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IFirewallPolicy, protos.google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
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.
Parameters | |
---|---|
Name | Description |
request |
IUpdateKeyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* 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;
Parameters | |
---|---|
Name | Description |
request |
IUpdateKeyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
request |
IUpdateKeyRequest
|
callback |
Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |