source: vendor/google/apiclient-services/src/OSConfig/Resource/ProjectsLocationsInstancesVulnerabilityReports.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 4.0 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\OSConfig\Resource;
19
20use Google\Service\OSConfig\ListVulnerabilityReportsResponse;
21use Google\Service\OSConfig\VulnerabilityReport;
22
23/**
24 * The "vulnerabilityReports" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $osconfigService = new Google\Service\OSConfig(...);
28 * $vulnerabilityReports = $osconfigService->projects_locations_instances_vulnerabilityReports;
29 * </code>
30 */
31class ProjectsLocationsInstancesVulnerabilityReports extends \Google\Service\Resource
32{
33 /**
34 * Gets the vulnerability report for the specified VM instance. Only VMs with
35 * inventory data have vulnerability reports associated with them.
36 * (vulnerabilityReports.get)
37 *
38 * @param string $name Required. API resource name for vulnerability resource.
39 * Format: `projects/{project}/locations/{location}/instances/{instance}/vulnera
40 * bilityReport` For `{project}`, either `project-number` or `project-id` can be
41 * provided. For `{instance}`, either Compute Engine `instance-id` or `instance-
42 * name` can be provided.
43 * @param array $optParams Optional parameters.
44 * @return VulnerabilityReport
45 * @throws \Google\Service\Exception
46 */
47 public function get($name, $optParams = [])
48 {
49 $params = ['name' => $name];
50 $params = array_merge($params, $optParams);
51 return $this->call('get', [$params], VulnerabilityReport::class);
52 }
53 /**
54 * List vulnerability reports for all VM instances in the specified zone.
55 * (vulnerabilityReports.listProjectsLocationsInstancesVulnerabilityReports)
56 *
57 * @param string $parent Required. The parent resource name. Format:
58 * `projects/{project}/locations/{location}/instances/-` For `{project}`, either
59 * `project-number` or `project-id` can be provided.
60 * @param array $optParams Optional parameters.
61 *
62 * @opt_param string filter This field supports filtering by the severity level
63 * for the vulnerability. For a list of severity levels, see [Severity levels
64 * for vulnerabilities](https://cloud.google.com/container-
65 * analysis/docs/container-scanning-
66 * overview#severity_levels_for_vulnerabilities). The filter field follows the
67 * rules described in the [AIP-160](https://google.aip.dev/160) guidelines as
68 * follows: + **Filter for a specific severity type**: you can list reports that
69 * contain vulnerabilities that are classified as medium by specifying
70 * `vulnerabilities.details.severity:MEDIUM`. + **Filter for a range of
71 * severities** : you can list reports that have vulnerabilities that are
72 * classified as critical or high by specifying
73 * `vulnerabilities.details.severity:HIGH OR
74 * vulnerabilities.details.severity:CRITICAL`
75 * @opt_param int pageSize The maximum number of results to return.
76 * @opt_param string pageToken A pagination token returned from a previous call
77 * to `ListVulnerabilityReports` that indicates where this listing should
78 * continue from.
79 * @return ListVulnerabilityReportsResponse
80 * @throws \Google\Service\Exception
81 */
82 public function listProjectsLocationsInstancesVulnerabilityReports($parent, $optParams = [])
83 {
84 $params = ['parent' => $parent];
85 $params = array_merge($params, $optParams);
86 return $this->call('list', [$params], ListVulnerabilityReportsResponse::class);
87 }
88}
89
90// Adding a class alias for backwards compatibility with the previous class name.
91class_alias(ProjectsLocationsInstancesVulnerabilityReports::class, 'Google_Service_OSConfig_Resource_ProjectsLocationsInstancesVulnerabilityReports');
Note: See TracBrowser for help on using the repository browser.