source: vendor/google/apiclient-services/src/Monitoring/Resource/ProjectsMonitoredResourceDescriptors.php

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

Upload project files

  • Property mode set to 100644
File size: 3.5 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\Monitoring\Resource;
19
20use Google\Service\Monitoring\ListMonitoredResourceDescriptorsResponse;
21use Google\Service\Monitoring\MonitoredResourceDescriptor;
22
23/**
24 * The "monitoredResourceDescriptors" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $monitoringService = new Google\Service\Monitoring(...);
28 * $monitoredResourceDescriptors = $monitoringService->projects_monitoredResourceDescriptors;
29 * </code>
30 */
31class ProjectsMonitoredResourceDescriptors extends \Google\Service\Resource
32{
33 /**
34 * Gets a single monitored resource descriptor.
35 * (monitoredResourceDescriptors.get)
36 *
37 * @param string $name Required. The monitored resource descriptor to get. The
38 * format is:
39 * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]
40 * The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.
41 * @param array $optParams Optional parameters.
42 * @return MonitoredResourceDescriptor
43 * @throws \Google\Service\Exception
44 */
45 public function get($name, $optParams = [])
46 {
47 $params = ['name' => $name];
48 $params = array_merge($params, $optParams);
49 return $this->call('get', [$params], MonitoredResourceDescriptor::class);
50 }
51 /**
52 * Lists monitored resource descriptors that match a filter.
53 * (monitoredResourceDescriptors.listProjectsMonitoredResourceDescriptors)
54 *
55 * @param string $name Required. The project
56 * (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute
57 * the request. The format is: projects/[PROJECT_ID_OR_NUMBER]
58 * @param array $optParams Optional parameters.
59 *
60 * @opt_param string filter An optional filter
61 * (https://cloud.google.com/monitoring/api/v3/filters) describing the
62 * descriptors to be returned. The filter can reference the descriptor's type
63 * and labels. For example, the following filter returns only Google Compute
64 * Engine descriptors that have an id label: resource.type = starts_with("gce_")
65 * AND resource.label:id
66 * @opt_param int pageSize A positive number that is the maximum number of
67 * results to return.
68 * @opt_param string pageToken If this field is not empty then it must contain
69 * the nextPageToken value returned by a previous call to this method. Using
70 * this field causes the method to return additional results from the previous
71 * method call.
72 * @return ListMonitoredResourceDescriptorsResponse
73 * @throws \Google\Service\Exception
74 */
75 public function listProjectsMonitoredResourceDescriptors($name, $optParams = [])
76 {
77 $params = ['name' => $name];
78 $params = array_merge($params, $optParams);
79 return $this->call('list', [$params], ListMonitoredResourceDescriptorsResponse::class);
80 }
81}
82
83// Adding a class alias for backwards compatibility with the previous class name.
84class_alias(ProjectsMonitoredResourceDescriptors::class, 'Google_Service_Monitoring_Resource_ProjectsMonitoredResourceDescriptors');
Note: See TracBrowser for help on using the repository browser.