Reference documentation and code samples for the Google Cloud Api Keys V2 Client class Restrictions.
Describes the restrictions on the key.
Generated from protobuf message google.api.apikeys.v2.Restrictions
Namespace
Google \ Cloud \ ApiKeys \ V2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ browser_key_restrictions
Google\Cloud\ApiKeys\V2\BrowserKeyRestrictions
The HTTP referrers (websites) that are allowed to use the key.
↳ server_key_restrictions
Google\Cloud\ApiKeys\V2\ServerKeyRestrictions
The IP addresses of callers that are allowed to use the key.
↳ android_key_restrictions
↳ ios_key_restrictions
↳ api_targets
array< Google\Cloud\ApiKeys\V2\ApiTarget
>
A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
getBrowserKeyRestrictions
The HTTP referrers (websites) that are allowed to use the key.
hasBrowserKeyRestrictions
setBrowserKeyRestrictions
The HTTP referrers (websites) that are allowed to use the key.
$this
getServerKeyRestrictions
The IP addresses of callers that are allowed to use the key.
hasServerKeyRestrictions
setServerKeyRestrictions
The IP addresses of callers that are allowed to use the key.
$this
getAndroidKeyRestrictions
The Android apps that are allowed to use the key.
hasAndroidKeyRestrictions
setAndroidKeyRestrictions
The Android apps that are allowed to use the key.
$this
getIosKeyRestrictions
The iOS apps that are allowed to use the key.
hasIosKeyRestrictions
setIosKeyRestrictions
The iOS apps that are allowed to use the key.
$this
getApiTargets
A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
setApiTargets
A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
$this
getClientRestrictions
string