* $monitoringService = new Google\Service\Monitoring(...); * $monitoredResourceDescriptors = $monitoringService->monitoredResourceDescriptors; * */ class ProjectsMonitoredResourceDescriptors extends \Google\Service\Resource { /** * Gets a single monitored resource descriptor. * (monitoredResourceDescriptors.get) * * @param string $name Required. The monitored resource descriptor to get. The * format is: * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] * The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database. * @param array $optParams Optional parameters. * @return MonitoredResourceDescriptor */ public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], MonitoredResourceDescriptor::class); } /** * Lists monitored resource descriptors that match a filter. * (monitoredResourceDescriptors.listProjectsMonitoredResourceDescriptors) * * @param string $name Required. The project * (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute * the request. The format is: projects/[PROJECT_ID_OR_NUMBER] * @param array $optParams Optional parameters. * * @opt_param string filter An optional filter * (https://cloud.google.com/monitoring/api/v3/filters) describing the * descriptors to be returned. The filter can reference the descriptor's type * and labels. For example, the following filter returns only Google Compute * Engine descriptors that have an id label: resource.type = starts_with("gce_") * AND resource.label:id * @opt_param int pageSize A positive number that is the maximum number of * results to return. * @opt_param string pageToken If this field is not empty then it must contain * the nextPageToken value returned by a previous call to this method. Using * this field causes the method to return additional results from the previous * method call. * @return ListMonitoredResourceDescriptorsResponse */ public function listProjectsMonitoredResourceDescriptors($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListMonitoredResourceDescriptorsResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsMonitoredResourceDescriptors::class, 'Google_Service_Monitoring_Resource_ProjectsMonitoredResourceDescriptors');