Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certificate manager error. #962

Closed
Richart-Senha-Segura opened this issue Oct 11, 2023 · 4 comments
Closed

Certificate manager error. #962

Richart-Senha-Segura opened this issue Oct 11, 2023 · 4 comments
Labels
bug Something isn't working triage Need triage

Comments

@Richart-Senha-Segura
Copy link

$certificateManagerClient = new CertificateManagerClient([
    'credentials' => $config,
]);

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)

@Richart-Senha-Segura Richart-Senha-Segura added bug Something isn't working triage Need triage labels Oct 11, 2023
@fiboknacky
Copy link
Member

Hello,

What're you trying to achieve here? I don't recognize the class you're trying to create (CertificateManagerClient).

@Richart-Senha-Segura
Copy link
Author

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());
    }

@fiboknacky
Copy link
Member

What API are you trying to use? This repo is for the Google Ads API and it doesn't have CertificateManagerClient.

@Richart-Senha-Segura
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Need triage
Projects
None yet
Development

No branches or pull requests

2 participants