* Lists on your Google Cloud Storage buckets. */ $bucketsAccessControls = $storageService->bucketAccessControls->listBucketAccessControls(DEFAULT_BUCKET); $listBucketsAccessControlsMarkup = generateMarkup('List Buckets Access Controls', $bucketsAccessControls); /** * Google Cloud Storage API request to retrieve the list of Access Control * Lists on your Google Cloud Storage objects. */ $objectsAccessControls = $storageService->objectAccessControls->listObjectAccessControls(DEFAULT_BUCKET, DEFAULT_OBJECT); $listObjectsAccessControlsMarkup = generateMarkup('List Objects Access Controls', $objectsAccessControls); /** * Google Cloud Storage API request to retrieve a bucket from your * Google Cloud Storage project. */ $bucket = $storageService->buckets->get(DEFAULT_BUCKET); $getBucketMarkup = generateMarkup('Get Bucket', $bucket); // The access token may have been updated lazily. $_SESSION['access_token'] = $client->getAccessToken(); } else { $authUrl = $client->createAuthUrl(); } ?> <!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <header><h1>Google Cloud Storage Sample App</h1></header> <div class="main-content"> <?php
* outlined parameters from your Google Compute Engine project. */ $deleteInstance = $computeService->instances->delete(DEFAULT_PROJECT, DEFAULT_ZONE_NAME, DEFAULT_NAME); $deleteInstanceMarkup = generateMarkup('Delete Instance', $deleteInstance); /** * Google Compute Engine API request to delete an instance matching the * outlined parameters from your Google Compute Engine project. */ $deleteInstanceWithMetadata = $computeService->instances->delete(DEFAULT_PROJECT, DEFAULT_ZONE_NAME, DEFAULT_NAME_WITH_METADATA); $deleteInstanceWithMetadataMarkup = generateMarkup('Delete Instance With Metadata', $deleteInstanceWithMetadata); /** * Google Compute Engine API request to retrieve the list of all global * operations associated with your Google Compute Engine project. */ $globalOperations = $computeService->globalOperations->listGlobalOperations(DEFAULT_PROJECT); $operationsListMarkup = generateMarkup('List Global Operations', $globalOperations); // The access token may have been updated lazily. $_SESSION['access_token'] = $client->getAccessToken(); } else { $authUrl = $client->createAuthUrl(); } ?> <!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <header><h1>Google Compute Engine Sample App</h1></header> <div class="main-content"> <?php