Closed Richart-Senha-Segura closed 11 months ago
Hello,
What're you trying to achieve here? I don't recognize the class you're trying to create (CertificateManagerClient
).
Hello, The client do the login with a service account to make ssl certificate with the google apk. Then when i'm trying to get the certifificates location, i got this error in the request builder. i changed my code a little but still i got the same error.
$certificateManagerClient = new CertificateManagerClient([ 'credentials' => $config, ]); $request = new ListLocationsRequest();
// Call the API and handle any network failures.
$response = $certificateManagerClient->listLocations((array)$request);
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
What API are you trying to use? This repo is for the Google Ads API and it doesn't have CertificateManagerClient
.
Sorry, i'm using the google php certificate manager sdk. i thinked i was in the certificate manager repository, i will post my issue there.
try { // Itera sobre páginas de elementos $pagedResponse = $certificateManagerClient->listLocations(['name' => 'project_name']); i got this error: Google\ApiCore\ValidationException: Could not map bindings for google.cloud.location.Locations/ListLocations to any Uri template. Bindings: Array ( [name] => 'project name' ) UriTemplates: Array ( [0] => /v1/{name=projects/*}/locations ) in /var/www/html/public_html/vendor/google/gax/src/RequestBuilder.php:134 Stack trace:
0 /var/www/html/public_html/vendor/google/gax/src/Transport/RestTransport.php(120): Google\ApiCore\RequestBuilder->build('google.cloud.lo...', Object(Google\Cloud\Location\ListLocationsRequest), Array)
1 /var/www/html/public_html/vendor/google/gax/src/GapicClientTrait.php(782): Google\ApiCore\Transport\RestTransport->startUnaryCall(Object(Google\ApiCore\Call), Array)
2 /var/www/html/public_html/vendor/google/gax/src/Middleware/CredentialsWrapperMiddleware.php(59): Google\Cloud\CertificateManager\V1\Gapic\CertificateManagerGapicClient->Google\ApiCore{closure}(Object(Google\ApiCore\Call), Array)
3 /var/www/html/public_html/vendor/google/gax/src/Middleware/FixedHeaderMiddleware.php(68): Google\ApiCore\Middleware\CredentialsWrapperMiddleware->__invoke(Object(Google\ApiCore\Call), Array)
4 /var/www/html/public_html/vendor/google/gax/src/Middleware/RetryMiddleware.php(85): Google\ApiCore\Middleware\FixedHeaderMiddleware->__invoke(Object(Google\ApiCore\Call), Array)
5 /var/www/html/public_html/vendor/google/gax/src/Middleware/OptionsFilterMiddleware.php(62): Google\ApiCore\Middleware\RetryMiddleware->__invoke(Object(Google\ApiCore\Call), Array)
6 /var/www/html/public_html/vendor/google/gax/src/Middleware/PagedMiddleware.php(67): Google\ApiCore\Middleware\OptionsFilterMiddleware->__invoke(Object(Google\ApiCore\Call), Array)
7 /var/www/html/public_html/vendor/google/gax/src/GapicClientTrait.php(964): Google\ApiCore\Middleware\PagedMiddleware->__invoke(Object(Google\ApiCore\Call), Array)