class ProjectsKeys extends Resource (View source)

The "keys" collection of methods.

Typical usage is:

 $recaptchaenterpriseService = new Google\Service\RecaptchaEnterprise(...);
 $keys = $recaptchaenterpriseService->projects_keys;

Methods

addIpOverride(string $name, GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest $postBody, array $optParams = [])

Adds an IP override to a key. The following restrictions hold: The maximum number of IP overrides per key is 100. For any conflict (such as IP already exists or IP part of an existing IP range), an error will be returned.

create(string $parent, GoogleCloudRecaptchaenterpriseV1Key $postBody, array $optParams = [])

Creates a new reCAPTCHA Enterprise key. (keys.create)

delete(string $name, array $optParams = [])

Deletes the specified key. (keys.delete)

get(string $name, array $optParams = [])

Returns the specified key. (keys.get)

getMetrics(string $name, array $optParams = [])

Get some aggregated metrics for a Key. This data can be used to build dashboards. (keys.getMetrics)

listProjectsKeys(string $parent, array $optParams = [])

Returns the list of all keys that belong to a project.

migrate(string $name, GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest $postBody, array $optParams = [])

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. (keys.migrate)

patch(string $name, GoogleCloudRecaptchaenterpriseV1Key $postBody, array $optParams = [])

Updates the specified key. (keys.patch)

retrieveLegacySecretKey(string $key, array $optParams = [])

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.

Details

GoogleCloudRecaptchaenterpriseV1AddIpOverrideResponse addIpOverride(string $name, GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest $postBody, array $optParams = [])

Adds an IP override to a key. The following restrictions hold: The maximum number of IP overrides per key is 100. For any conflict (such as IP already exists or IP part of an existing IP range), an error will be returned.

(keys.addIpOverride)

Parameters

string $name

Required. The name of the key to which the IP override is added, in the format projects/{project}/keys/{key}.

GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudRecaptchaenterpriseV1AddIpOverrideResponse

Exceptions

Exception

GoogleCloudRecaptchaenterpriseV1Key create(string $parent, GoogleCloudRecaptchaenterpriseV1Key $postBody, array $optParams = [])

Creates a new reCAPTCHA Enterprise key. (keys.create)

Parameters

string $parent

Required. The name of the project in which the key will be created, in the format projects/{project}.

GoogleCloudRecaptchaenterpriseV1Key $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudRecaptchaenterpriseV1Key

Exceptions

Exception

GoogleProtobufEmpty delete(string $name, array $optParams = [])

Deletes the specified key. (keys.delete)

Parameters

string $name

Required. The name of the key to be deleted, in the format projects/{project}/keys/{key}.

array $optParams

Optional parameters.

Return Value

GoogleProtobufEmpty

Exceptions

Exception

GoogleCloudRecaptchaenterpriseV1Key get(string $name, array $optParams = [])

Returns the specified key. (keys.get)

Parameters

string $name

Required. The name of the requested key, in the format projects/{project}/keys/{key}.

array $optParams

Optional parameters.

Return Value

GoogleCloudRecaptchaenterpriseV1Key

Exceptions

Exception

GoogleCloudRecaptchaenterpriseV1Metrics getMetrics(string $name, array $optParams = [])

Get some aggregated metrics for a Key. This data can be used to build dashboards. (keys.getMetrics)

Parameters

string $name

Required. The name of the requested metrics, in the format projects/{project}/keys/{key}/metrics.

array $optParams

Optional parameters.

Return Value

GoogleCloudRecaptchaenterpriseV1Metrics

Exceptions

Exception

GoogleCloudRecaptchaenterpriseV1ListKeysResponse listProjectsKeys(string $parent, array $optParams = [])

Returns the list of all keys that belong to a project.

(keys.listProjectsKeys)

Parameters

string $parent

Required. The name of the project that contains the keys that will be listed, in the format projects/{project}.

array $optParams

Optional parameters.

Return Value

GoogleCloudRecaptchaenterpriseV1ListKeysResponse

Exceptions

Exception

GoogleCloudRecaptchaenterpriseV1Key migrate(string $name, GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest $postBody, array $optParams = [])

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. (keys.migrate)

Parameters

string $name

Required. The name of the key to be migrated, in the format projects/{project}/keys/{key}.

GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudRecaptchaenterpriseV1Key

Exceptions

Exception

GoogleCloudRecaptchaenterpriseV1Key patch(string $name, GoogleCloudRecaptchaenterpriseV1Key $postBody, array $optParams = [])

Updates the specified key. (keys.patch)

Parameters

string $name

Identifier. The resource name for the Key in the format projects/{project}/keys/{key}.

GoogleCloudRecaptchaenterpriseV1Key $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudRecaptchaenterpriseV1Key

Exceptions

Exception

GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse retrieveLegacySecretKey(string $key, array $optParams = [])

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.

(keys.retrieveLegacySecretKey)

Parameters

string $key

Required. The public key name linked to the requested secret key in the format projects/{project}/keys/{key}.

array $optParams

Optional parameters.

Return Value

GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse

Exceptions

Exception