Class ProjectsResource.MetricsResource
The "metrics" collection of methods.
Inherited Members
Namespace: Google.Apis.Logging.v2
Assembly: Google.Apis.Logging.v2.dll
Syntax
public class ProjectsResource.MetricsResource
Constructors
MetricsResource(IClientService)
Constructs a new resource.
Declaration
public MetricsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
Create(LogMetric, string)
Creates a logs-based metric.
Declaration
public virtual ProjectsResource.MetricsResource.CreateRequest Create(LogMetric body, string parent)
Parameters
Type | Name | Description |
---|---|---|
LogMetric | body | The body of the request. |
string | parent | Required. The resource name of the project in which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. |
Returns
Type | Description |
---|---|
ProjectsResource.MetricsResource.CreateRequest |
Delete(string)
Deletes a logs-based metric.
Declaration
public virtual ProjectsResource.MetricsResource.DeleteRequest Delete(string metricName)
Parameters
Type | Name | Description |
---|---|---|
string | metricName | Required. The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" |
Returns
Type | Description |
---|---|
ProjectsResource.MetricsResource.DeleteRequest |
Get(string)
Gets a logs-based metric.
Declaration
public virtual ProjectsResource.MetricsResource.GetRequest Get(string metricName)
Parameters
Type | Name | Description |
---|---|---|
string | metricName | Required. The resource name of the desired metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" |
Returns
Type | Description |
---|---|
ProjectsResource.MetricsResource.GetRequest |
List(string)
Lists logs-based metrics.
Declaration
public virtual ProjectsResource.MetricsResource.ListRequest List(string parent)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the project containing the metrics: "projects/[PROJECT_ID]" |
Returns
Type | Description |
---|---|
ProjectsResource.MetricsResource.ListRequest |
Update(LogMetric, string)
Creates or updates a logs-based metric.
Declaration
public virtual ProjectsResource.MetricsResource.UpdateRequest Update(LogMetric body, string metricName)
Parameters
Type | Name | Description |
---|---|---|
LogMetric | body | The body of the request. |
string | metricName | Required. The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created. |
Returns
Type | Description |
---|---|
ProjectsResource.MetricsResource.UpdateRequest |