PHP code example of google / cloud-osconfig

1. Go to this page and download the library: Download google/cloud-osconfig library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

google / cloud-osconfig example snippets




use Google\Cloud\OsConfig\V1\OsConfigServiceClient;

$client = new OsConfigServiceClient();

$jobs = $client->listPatchJobs(
	OsConfigServiceClient::projectName('[MY_PROJECT_ID]')
);

foreach ($jobs as $job) {
	print $job->getName() . ': ' . $job->getDescription() . PHP_EOL;
}