* $baremetalsolutionService = new Google\Service\Baremetalsolution(...); * $sshKeys = $baremetalsolutionService->projects_locations_sshKeys; * */ class ProjectsLocationsSshKeys extends \Google\Service\Resource { /** * Register a public SSH key in the specified project for use with the * interactive serial console feature. (sshKeys.create) * * @param string $parent Required. The parent containing the SSH keys. * @param SSHKey $postBody * @param array $optParams Optional parameters. * * @opt_param string sshKeyId Required. The ID to use for the key, which will * become the final component of the key's resource name. This value must match * the regex: [a-zA-Z0-9@.\-_]{1,64} * @return SSHKey * @throws \Google\Service\Exception */ public function create($parent, SSHKey $postBody, $optParams = []) { $params = ['parent' => $parent, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('create', [$params], SSHKey::class); } /** * Deletes a public SSH key registered in the specified project. * (sshKeys.delete) * * @param string $name Required. The name of the SSH key to delete. Currently, * the only valid value for the location is "global". * @param array $optParams Optional parameters. * @return BaremetalsolutionEmpty * @throws \Google\Service\Exception */ public function delete($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('delete', [$params], BaremetalsolutionEmpty::class); } /** * Lists the public SSH keys registered for the specified project. These SSH * keys are used only for the interactive serial console feature. * (sshKeys.listProjectsLocationsSshKeys) * * @param string $parent Required. The parent containing the SSH keys. * Currently, the only valid value for the location is "global". * @param array $optParams Optional parameters. * * @opt_param int pageSize The maximum number of items to return. * @opt_param string pageToken The next_page_token value returned from a * previous List request, if any. * @return ListSSHKeysResponse * @throws \Google\Service\Exception */ public function listProjectsLocationsSshKeys($parent, $optParams = []) { $params = ['parent' => $parent]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListSSHKeysResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsLocationsSshKeys::class, 'Google_Service_Baremetalsolution_Resource_ProjectsLocationsSshKeys');