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\Apigee\Resource; 19 20use Google\Service\Apigee\GoogleCloudApigeeV1Stats; 21 22/** 23 * The "stats" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $apigeeService = new Google\Service\Apigee(...); 27 * $stats = $apigeeService->stats; 28 * </code> 29 */ 30class OrganizationsEnvironmentsStats extends \Google\Service\Resource 31{ 32 /** 33 * Retrieve metrics grouped by dimensions. The types of metrics you can retrieve 34 * include traffic, message counts, API call latency, response size, and cache 35 * hits and counts. Dimensions let you view metrics in meaningful groups. You 36 * can optionally pass dimensions as path parameters to the `stats` API. If 37 * dimensions are not specified, the metrics are computed on the entire set of 38 * data for the given time range. (stats.get) 39 * 40 * @param string $name Required. Resource name for which the interactive query 41 * will be executed. Use the following format in your request: 42 * `organizations/{org}/environments/{env}/stats/{dimensions}` Dimensions let 43 * you view metrics in meaningful groupings, such as `apiproxy` or 44 * `target_host`. The value of dimensions should be a comma-separated list, as 45 * shown below: 46 * `organizations/{org}/environments/{env}/stats/apiproxy,request_verb` 47 * @param array $optParams Optional parameters. 48 * 49 * @opt_param string accuracy No longer used by Apigee. Supported for backwards 50 * compatibility. 51 * @opt_param string aggTable Table name used to query custom aggregate tables. 52 * If this parameter is skipped, then Apigee will try to retrieve the data from 53 * fact tables which will be expensive. 54 * @opt_param string filter Filter that enables you to drill down on specific 55 * dimension values. 56 * @opt_param string limit Maximum number of result items to return. The default 57 * and maximum value that can be returned is 14400. 58 * @opt_param string offset Offset value. Use `offset` with `limit` to enable 59 * pagination of results. For example, to display results 11-20, set limit to 60 * `10` and offset to `10`. 61 * @opt_param bool realtime No longer used by Apigee. Supported for backwards 62 * compatibility. 63 * @opt_param string select Comma-separated list of metrics. For example: 64 * `sum(message_count),sum(error_count)` 65 * @opt_param bool sonar Routes the query to API Monitoring for the last hour. 66 * @opt_param string sort Flag that specifies whether the sort order should be 67 * ascending or descending. Valid values include: `DESC` and `ASC`. 68 * @opt_param string sortby Comma-separated list of columns to sort the final 69 * result. 70 * @opt_param string timeRange Time interval for the interactive query. Time 71 * range is specified in GMT as `start~end`. For example: `04/15/2017 72 * 00:00~05/15/2017 23:59` 73 * @opt_param string timeUnit Granularity of metrics returned. Valid values 74 * include: `second`, `minute`, `hour`, `day`, `week`, or` month`. 75 * @opt_param string topk Top number of results to return. For example, to 76 * return the top 5 results, set `topk=5`. 77 * @opt_param bool tsAscending Flag that specifies whether to list timestamps in 78 * ascending (`true`) or descending (`false`) order. Apigee recommends that you 79 * set this value to `true` if you are using `sortby` with `sort=DESC`. 80 * @opt_param string tzo Timezone offset value. 81 * @return GoogleCloudApigeeV1Stats 82 */ 83 public function get($name, $optParams = []) 84 { 85 $params = ['name' => $name]; 86 $params = array_merge($params, $optParams); 87 return $this->call('get', [$params], GoogleCloudApigeeV1Stats::class); 88 } 89} 90 91// Adding a class alias for backwards compatibility with the previous class name. 92class_alias(OrganizationsEnvironmentsStats::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironmentsStats'); 93