Reference documentation and code samples for the Google Cloud Api Hub V1 Client class ApiKeyConfig.
Config for authentication with API key.
Generated from protobuf message google.cloud.apihub.v1.AuthConfig.ApiKeyConfig
Namespace
Google \ Cloud \ ApiHub \ V1 \ AuthConfigMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Required. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=
|
↳ api_key |
Google\Cloud\ApiHub\V1\Secret
Required. The name of the SecretManager secret version resource storing the API key. Format: |
↳ http_element_location |
int
Required. The location of the API key. The default value is QUERY. |
getName
Required. The parameter name of the API key.
E.g. If the API request is "https://example.com/act?api_key=
Returns | |
---|---|
Type | Description |
string |
setName
Required. The parameter name of the API key.
E.g. If the API request is "https://example.com/act?api_key=
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getApiKey
Required. The name of the SecretManager secret version resource storing
the API key. Format:
projects/{project}/secrets/{secrete}/versions/{version}
. The
secretmanager.versions.access
permission should be granted to the
service account accessing the secret.
Returns | |
---|---|
Type | Description |
Google\Cloud\ApiHub\V1\Secret|null |
hasApiKey
clearApiKey
setApiKey
Required. The name of the SecretManager secret version resource storing
the API key. Format:
projects/{project}/secrets/{secrete}/versions/{version}
. The
secretmanager.versions.access
permission should be granted to the
service account accessing the secret.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\ApiHub\V1\Secret
|
Returns | |
---|---|
Type | Description |
$this |
getHttpElementLocation
Required. The location of the API key.
The default value is QUERY.
Returns | |
---|---|
Type | Description |
int |
Enum of type HttpElementLocation. |
setHttpElementLocation
Required. The location of the API key.
The default value is QUERY.
Parameter | |
---|---|
Name | Description |
var |
int
Enum of type HttpElementLocation. |
Returns | |
---|---|
Type | Description |
$this |