public abstract class MetricServiceClient
MetricService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Monitoring.V3Assembly
Google.Cloud.Monitoring.V3.dll
Remarks
Manages metric descriptors, monitored resource descriptors, and time series data.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the MetricService service, which is a host of "monitoring.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default MetricService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default MetricService scopes are:
GrpcClient
public virtual MetricService.MetricServiceClient GrpcClient { get; }
The underlying gRPC MetricService client
Property Value | |
---|---|
Type | Description |
MetricService.MetricServiceClient |
Methods
Create()
public static MetricServiceClient Create()
Synchronously creates a MetricServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use MetricServiceClientBuilder.
Returns | |
---|---|
Type | Description |
MetricServiceClient | The created MetricServiceClient. |
CreateAsync(CancellationToken)
public static Task<MetricServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a MetricServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use MetricServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<MetricServiceClient> | The task representing the created MetricServiceClient. |
CreateMetricDescriptor(IResourceName, MetricDescriptor, CallSettings)
public virtual MetricDescriptor CreateMetricDescriptor(IResourceName name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = metricServiceClient.CreateMetricDescriptor(name, metricDescriptor);
CreateMetricDescriptor(FolderName, MetricDescriptor, CallSettings)
public virtual MetricDescriptor CreateMetricDescriptor(FolderName name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = metricServiceClient.CreateMetricDescriptor(name, metricDescriptor);
CreateMetricDescriptor(OrganizationName, MetricDescriptor, CallSettings)
public virtual MetricDescriptor CreateMetricDescriptor(OrganizationName name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = metricServiceClient.CreateMetricDescriptor(name, metricDescriptor);
CreateMetricDescriptor(ProjectName, MetricDescriptor, CallSettings)
public virtual MetricDescriptor CreateMetricDescriptor(ProjectName name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = metricServiceClient.CreateMetricDescriptor(name, metricDescriptor);
CreateMetricDescriptor(CreateMetricDescriptorRequest, CallSettings)
public virtual MetricDescriptor CreateMetricDescriptor(CreateMetricDescriptorRequest request, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
request | CreateMetricDescriptorRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
CreateMetricDescriptorRequest request = new CreateMetricDescriptorRequest
{
MetricDescriptor = new MetricDescriptor(),
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
MetricDescriptor response = metricServiceClient.CreateMetricDescriptor(request);
CreateMetricDescriptor(String, MetricDescriptor, CallSettings)
public virtual MetricDescriptor CreateMetricDescriptor(string name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = metricServiceClient.CreateMetricDescriptor(name, metricDescriptor);
CreateMetricDescriptorAsync(IResourceName, MetricDescriptor, CallSettings)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(IResourceName name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateMetricDescriptorAsync(IResourceName, MetricDescriptor, CancellationToken)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(IResourceName name, MetricDescriptor metricDescriptor, CancellationToken cancellationToken)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateMetricDescriptorAsync(FolderName, MetricDescriptor, CallSettings)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(FolderName name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateMetricDescriptorAsync(FolderName, MetricDescriptor, CancellationToken)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(FolderName name, MetricDescriptor metricDescriptor, CancellationToken cancellationToken)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateMetricDescriptorAsync(OrganizationName, MetricDescriptor, CallSettings)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(OrganizationName name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateMetricDescriptorAsync(OrganizationName, MetricDescriptor, CancellationToken)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(OrganizationName name, MetricDescriptor metricDescriptor, CancellationToken cancellationToken)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateMetricDescriptorAsync(ProjectName, MetricDescriptor, CallSettings)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(ProjectName name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateMetricDescriptorAsync(ProjectName, MetricDescriptor, CancellationToken)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(ProjectName name, MetricDescriptor metricDescriptor, CancellationToken cancellationToken)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateMetricDescriptorAsync(CreateMetricDescriptorRequest, CallSettings)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(CreateMetricDescriptorRequest request, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
request | CreateMetricDescriptorRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
CreateMetricDescriptorRequest request = new CreateMetricDescriptorRequest
{
MetricDescriptor = new MetricDescriptor(),
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(request);
CreateMetricDescriptorAsync(CreateMetricDescriptorRequest, CancellationToken)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(CreateMetricDescriptorRequest request, CancellationToken cancellationToken)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
request | CreateMetricDescriptorRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
CreateMetricDescriptorRequest request = new CreateMetricDescriptorRequest
{
MetricDescriptor = new MetricDescriptor(),
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(request);
CreateMetricDescriptorAsync(String, MetricDescriptor, CallSettings)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(string name, MetricDescriptor metricDescriptor, CallSettings callSettings = null)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateMetricDescriptorAsync(String, MetricDescriptor, CancellationToken)
public virtual Task<MetricDescriptor> CreateMetricDescriptorAsync(string name, MetricDescriptor metricDescriptor, CancellationToken cancellationToken)
Creates a new metric descriptor. User-created metric descriptors define custom metrics.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
metricDescriptor | MetricDescriptor Required. The new custom metric descriptor. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
MetricDescriptor metricDescriptor = new MetricDescriptor();
// Make the request
MetricDescriptor response = await metricServiceClient.CreateMetricDescriptorAsync(name, metricDescriptor);
CreateTimeSeries(ProjectName, IEnumerable<TimeSeries>, CallSettings)
public virtual void CreateTimeSeries(ProjectName name, IEnumerable<TimeSeries> timeSeries, CallSettings callSettings = null)
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
timeSeries | IEnumerable<TimeSeries> Required. The new data to be added to a list of time series.
Adds at most one data point to each of several time series. The new data
point must be more recent than any other point in its time series. Each
The maximum number of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
IEnumerable<TimeSeries> timeSeries = new TimeSeries[] { new TimeSeries(), };
// Make the request
metricServiceClient.CreateTimeSeries(name, timeSeries);
CreateTimeSeries(CreateTimeSeriesRequest, CallSettings)
public virtual void CreateTimeSeries(CreateTimeSeriesRequest request, CallSettings callSettings = null)
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Parameters | |
---|---|
Name | Description |
request | CreateTimeSeriesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
CreateTimeSeriesRequest request = new CreateTimeSeriesRequest
{
TimeSeries = { new TimeSeries(), },
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
metricServiceClient.CreateTimeSeries(request);
CreateTimeSeries(String, IEnumerable<TimeSeries>, CallSettings)
public virtual void CreateTimeSeries(string name, IEnumerable<TimeSeries> timeSeries, CallSettings callSettings = null)
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
timeSeries | IEnumerable<TimeSeries> Required. The new data to be added to a list of time series.
Adds at most one data point to each of several time series. The new data
point must be more recent than any other point in its time series. Each
The maximum number of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
IEnumerable<TimeSeries> timeSeries = new TimeSeries[] { new TimeSeries(), };
// Make the request
metricServiceClient.CreateTimeSeries(name, timeSeries);
CreateTimeSeriesAsync(ProjectName, IEnumerable<TimeSeries>, CallSettings)
public virtual Task CreateTimeSeriesAsync(ProjectName name, IEnumerable<TimeSeries> timeSeries, CallSettings callSettings = null)
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
timeSeries | IEnumerable<TimeSeries> Required. The new data to be added to a list of time series.
Adds at most one data point to each of several time series. The new data
point must be more recent than any other point in its time series. Each
The maximum number of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
IEnumerable<TimeSeries> timeSeries = new TimeSeries[] { new TimeSeries(), };
// Make the request
await metricServiceClient.CreateTimeSeriesAsync(name, timeSeries);
CreateTimeSeriesAsync(ProjectName, IEnumerable<TimeSeries>, CancellationToken)
public virtual Task CreateTimeSeriesAsync(ProjectName name, IEnumerable<TimeSeries> timeSeries, CancellationToken cancellationToken)
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
timeSeries | IEnumerable<TimeSeries> Required. The new data to be added to a list of time series.
Adds at most one data point to each of several time series. The new data
point must be more recent than any other point in its time series. Each
The maximum number of |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
IEnumerable<TimeSeries> timeSeries = new TimeSeries[] { new TimeSeries(), };
// Make the request
await metricServiceClient.CreateTimeSeriesAsync(name, timeSeries);
CreateTimeSeriesAsync(CreateTimeSeriesRequest, CallSettings)
public virtual Task CreateTimeSeriesAsync(CreateTimeSeriesRequest request, CallSettings callSettings = null)
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Parameters | |
---|---|
Name | Description |
request | CreateTimeSeriesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTimeSeriesRequest request = new CreateTimeSeriesRequest
{
TimeSeries = { new TimeSeries(), },
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
await metricServiceClient.CreateTimeSeriesAsync(request);
CreateTimeSeriesAsync(CreateTimeSeriesRequest, CancellationToken)
public virtual Task CreateTimeSeriesAsync(CreateTimeSeriesRequest request, CancellationToken cancellationToken)
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Parameters | |
---|---|
Name | Description |
request | CreateTimeSeriesRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTimeSeriesRequest request = new CreateTimeSeriesRequest
{
TimeSeries = { new TimeSeries(), },
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
await metricServiceClient.CreateTimeSeriesAsync(request);
CreateTimeSeriesAsync(String, IEnumerable<TimeSeries>, CallSettings)
public virtual Task CreateTimeSeriesAsync(string name, IEnumerable<TimeSeries> timeSeries, CallSettings callSettings = null)
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
timeSeries | IEnumerable<TimeSeries> Required. The new data to be added to a list of time series.
Adds at most one data point to each of several time series. The new data
point must be more recent than any other point in its time series. Each
The maximum number of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
IEnumerable<TimeSeries> timeSeries = new TimeSeries[] { new TimeSeries(), };
// Make the request
await metricServiceClient.CreateTimeSeriesAsync(name, timeSeries);
CreateTimeSeriesAsync(String, IEnumerable<TimeSeries>, CancellationToken)
public virtual Task CreateTimeSeriesAsync(string name, IEnumerable<TimeSeries> timeSeries, CancellationToken cancellationToken)
Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
timeSeries | IEnumerable<TimeSeries> Required. The new data to be added to a list of time series.
Adds at most one data point to each of several time series. The new data
point must be more recent than any other point in its time series. Each
The maximum number of |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
IEnumerable<TimeSeries> timeSeries = new TimeSeries[] { new TimeSeries(), };
// Make the request
await metricServiceClient.CreateTimeSeriesAsync(name, timeSeries);
DeleteMetricDescriptor(IResourceName, CallSettings)
public virtual void DeleteMetricDescriptor(IResourceName name, CallSettings callSettings = null)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
metricServiceClient.DeleteMetricDescriptor(name);
DeleteMetricDescriptor(DeleteMetricDescriptorRequest, CallSettings)
public virtual void DeleteMetricDescriptor(DeleteMetricDescriptorRequest request, CallSettings callSettings = null)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
request | DeleteMetricDescriptorRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
DeleteMetricDescriptorRequest request = new DeleteMetricDescriptorRequest
{
MetricDescriptorName = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]"),
};
// Make the request
metricServiceClient.DeleteMetricDescriptor(request);
DeleteMetricDescriptor(MetricDescriptorName, CallSettings)
public virtual void DeleteMetricDescriptor(MetricDescriptorName name, CallSettings callSettings = null)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
name | MetricDescriptorName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
MetricDescriptorName name = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]");
// Make the request
metricServiceClient.DeleteMetricDescriptor(name);
DeleteMetricDescriptor(String, CallSettings)
public virtual void DeleteMetricDescriptor(string name, CallSettings callSettings = null)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
name | String Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/metricDescriptors/[METRIC_DESCRIPTOR]";
// Make the request
metricServiceClient.DeleteMetricDescriptor(name);
DeleteMetricDescriptorAsync(IResourceName, CallSettings)
public virtual Task DeleteMetricDescriptorAsync(IResourceName name, CallSettings callSettings = null)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
await metricServiceClient.DeleteMetricDescriptorAsync(name);
DeleteMetricDescriptorAsync(IResourceName, CancellationToken)
public virtual Task DeleteMetricDescriptorAsync(IResourceName name, CancellationToken cancellationToken)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
await metricServiceClient.DeleteMetricDescriptorAsync(name);
DeleteMetricDescriptorAsync(DeleteMetricDescriptorRequest, CallSettings)
public virtual Task DeleteMetricDescriptorAsync(DeleteMetricDescriptorRequest request, CallSettings callSettings = null)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
request | DeleteMetricDescriptorRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteMetricDescriptorRequest request = new DeleteMetricDescriptorRequest
{
MetricDescriptorName = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]"),
};
// Make the request
await metricServiceClient.DeleteMetricDescriptorAsync(request);
DeleteMetricDescriptorAsync(DeleteMetricDescriptorRequest, CancellationToken)
public virtual Task DeleteMetricDescriptorAsync(DeleteMetricDescriptorRequest request, CancellationToken cancellationToken)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
request | DeleteMetricDescriptorRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteMetricDescriptorRequest request = new DeleteMetricDescriptorRequest
{
MetricDescriptorName = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]"),
};
// Make the request
await metricServiceClient.DeleteMetricDescriptorAsync(request);
DeleteMetricDescriptorAsync(MetricDescriptorName, CallSettings)
public virtual Task DeleteMetricDescriptorAsync(MetricDescriptorName name, CallSettings callSettings = null)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
name | MetricDescriptorName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
MetricDescriptorName name = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]");
// Make the request
await metricServiceClient.DeleteMetricDescriptorAsync(name);
DeleteMetricDescriptorAsync(MetricDescriptorName, CancellationToken)
public virtual Task DeleteMetricDescriptorAsync(MetricDescriptorName name, CancellationToken cancellationToken)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
name | MetricDescriptorName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
MetricDescriptorName name = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]");
// Make the request
await metricServiceClient.DeleteMetricDescriptorAsync(name);
DeleteMetricDescriptorAsync(String, CallSettings)
public virtual Task DeleteMetricDescriptorAsync(string name, CallSettings callSettings = null)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
name | String Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/metricDescriptors/[METRIC_DESCRIPTOR]";
// Make the request
await metricServiceClient.DeleteMetricDescriptorAsync(name);
DeleteMetricDescriptorAsync(String, CancellationToken)
public virtual Task DeleteMetricDescriptorAsync(string name, CancellationToken cancellationToken)
Deletes a metric descriptor. Only user-created custom metrics can be deleted.
Parameters | |
---|---|
Name | Description |
name | String Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/metricDescriptors/[METRIC_DESCRIPTOR]";
// Make the request
await metricServiceClient.DeleteMetricDescriptorAsync(name);
GetMetricDescriptor(IResourceName, CallSettings)
public virtual MetricDescriptor GetMetricDescriptor(IResourceName name, CallSettings callSettings = null)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
MetricDescriptor response = metricServiceClient.GetMetricDescriptor(name);
GetMetricDescriptor(GetMetricDescriptorRequest, CallSettings)
public virtual MetricDescriptor GetMetricDescriptor(GetMetricDescriptorRequest request, CallSettings callSettings = null)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | GetMetricDescriptorRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
GetMetricDescriptorRequest request = new GetMetricDescriptorRequest
{
MetricDescriptorName = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]"),
};
// Make the request
MetricDescriptor response = metricServiceClient.GetMetricDescriptor(request);
GetMetricDescriptor(MetricDescriptorName, CallSettings)
public virtual MetricDescriptor GetMetricDescriptor(MetricDescriptorName name, CallSettings callSettings = null)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | MetricDescriptorName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
MetricDescriptorName name = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]");
// Make the request
MetricDescriptor response = metricServiceClient.GetMetricDescriptor(name);
GetMetricDescriptor(String, CallSettings)
public virtual MetricDescriptor GetMetricDescriptor(string name, CallSettings callSettings = null)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MetricDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/metricDescriptors/[METRIC_DESCRIPTOR]";
// Make the request
MetricDescriptor response = metricServiceClient.GetMetricDescriptor(name);
GetMetricDescriptorAsync(IResourceName, CallSettings)
public virtual Task<MetricDescriptor> GetMetricDescriptorAsync(IResourceName name, CallSettings callSettings = null)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
MetricDescriptor response = await metricServiceClient.GetMetricDescriptorAsync(name);
GetMetricDescriptorAsync(IResourceName, CancellationToken)
public virtual Task<MetricDescriptor> GetMetricDescriptorAsync(IResourceName name, CancellationToken cancellationToken)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
MetricDescriptor response = await metricServiceClient.GetMetricDescriptorAsync(name);
GetMetricDescriptorAsync(GetMetricDescriptorRequest, CallSettings)
public virtual Task<MetricDescriptor> GetMetricDescriptorAsync(GetMetricDescriptorRequest request, CallSettings callSettings = null)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | GetMetricDescriptorRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
GetMetricDescriptorRequest request = new GetMetricDescriptorRequest
{
MetricDescriptorName = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]"),
};
// Make the request
MetricDescriptor response = await metricServiceClient.GetMetricDescriptorAsync(request);
GetMetricDescriptorAsync(GetMetricDescriptorRequest, CancellationToken)
public virtual Task<MetricDescriptor> GetMetricDescriptorAsync(GetMetricDescriptorRequest request, CancellationToken cancellationToken)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | GetMetricDescriptorRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
GetMetricDescriptorRequest request = new GetMetricDescriptorRequest
{
MetricDescriptorName = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]"),
};
// Make the request
MetricDescriptor response = await metricServiceClient.GetMetricDescriptorAsync(request);
GetMetricDescriptorAsync(MetricDescriptorName, CallSettings)
public virtual Task<MetricDescriptor> GetMetricDescriptorAsync(MetricDescriptorName name, CallSettings callSettings = null)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | MetricDescriptorName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
MetricDescriptorName name = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]");
// Make the request
MetricDescriptor response = await metricServiceClient.GetMetricDescriptorAsync(name);
GetMetricDescriptorAsync(MetricDescriptorName, CancellationToken)
public virtual Task<MetricDescriptor> GetMetricDescriptorAsync(MetricDescriptorName name, CancellationToken cancellationToken)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | MetricDescriptorName Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
MetricDescriptorName name = MetricDescriptorName.FromProjectMetricDescriptor("[PROJECT]", "[METRIC_DESCRIPTOR]");
// Make the request
MetricDescriptor response = await metricServiceClient.GetMetricDescriptorAsync(name);
GetMetricDescriptorAsync(String, CallSettings)
public virtual Task<MetricDescriptor> GetMetricDescriptorAsync(string name, CallSettings callSettings = null)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/metricDescriptors/[METRIC_DESCRIPTOR]";
// Make the request
MetricDescriptor response = await metricServiceClient.GetMetricDescriptorAsync(name);
GetMetricDescriptorAsync(String, CancellationToken)
public virtual Task<MetricDescriptor> GetMetricDescriptorAsync(string name, CancellationToken cancellationToken)
Gets a single metric descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MetricDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/metricDescriptors/[METRIC_DESCRIPTOR]";
// Make the request
MetricDescriptor response = await metricServiceClient.GetMetricDescriptorAsync(name);
GetMonitoredResourceDescriptor(IResourceName, CallSettings)
public virtual MonitoredResourceDescriptor GetMonitoredResourceDescriptor(IResourceName name, CallSettings callSettings = null)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MonitoredResourceDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
MonitoredResourceDescriptor response = metricServiceClient.GetMonitoredResourceDescriptor(name);
GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest, CallSettings)
public virtual MonitoredResourceDescriptor GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest request, CallSettings callSettings = null)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | GetMonitoredResourceDescriptorRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MonitoredResourceDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
GetMonitoredResourceDescriptorRequest request = new GetMonitoredResourceDescriptorRequest
{
MonitoredResourceDescriptorName = MonitoredResourceDescriptorName.FromProjectMonitoredResourceDescriptor("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"),
};
// Make the request
MonitoredResourceDescriptor response = metricServiceClient.GetMonitoredResourceDescriptor(request);
GetMonitoredResourceDescriptor(MonitoredResourceDescriptorName, CallSettings)
public virtual MonitoredResourceDescriptor GetMonitoredResourceDescriptor(MonitoredResourceDescriptorName name, CallSettings callSettings = null)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | MonitoredResourceDescriptorName Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MonitoredResourceDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
MonitoredResourceDescriptorName name = MonitoredResourceDescriptorName.FromProjectMonitoredResourceDescriptor("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
// Make the request
MonitoredResourceDescriptor response = metricServiceClient.GetMonitoredResourceDescriptor(name);
GetMonitoredResourceDescriptor(String, CallSettings)
public virtual MonitoredResourceDescriptor GetMonitoredResourceDescriptor(string name, CallSettings callSettings = null)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
MonitoredResourceDescriptor | The RPC response. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/monitoredResourceDescriptors/[MONITORED_RESOURCE_DESCRIPTOR]";
// Make the request
MonitoredResourceDescriptor response = metricServiceClient.GetMonitoredResourceDescriptor(name);
GetMonitoredResourceDescriptorAsync(IResourceName, CallSettings)
public virtual Task<MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(IResourceName name, CallSettings callSettings = null)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MonitoredResourceDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
MonitoredResourceDescriptor response = await metricServiceClient.GetMonitoredResourceDescriptorAsync(name);
GetMonitoredResourceDescriptorAsync(IResourceName, CancellationToken)
public virtual Task<MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(IResourceName name, CancellationToken cancellationToken)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MonitoredResourceDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
MonitoredResourceDescriptor response = await metricServiceClient.GetMonitoredResourceDescriptorAsync(name);
GetMonitoredResourceDescriptorAsync(GetMonitoredResourceDescriptorRequest, CallSettings)
public virtual Task<MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(GetMonitoredResourceDescriptorRequest request, CallSettings callSettings = null)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | GetMonitoredResourceDescriptorRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MonitoredResourceDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
GetMonitoredResourceDescriptorRequest request = new GetMonitoredResourceDescriptorRequest
{
MonitoredResourceDescriptorName = MonitoredResourceDescriptorName.FromProjectMonitoredResourceDescriptor("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"),
};
// Make the request
MonitoredResourceDescriptor response = await metricServiceClient.GetMonitoredResourceDescriptorAsync(request);
GetMonitoredResourceDescriptorAsync(GetMonitoredResourceDescriptorRequest, CancellationToken)
public virtual Task<MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(GetMonitoredResourceDescriptorRequest request, CancellationToken cancellationToken)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | GetMonitoredResourceDescriptorRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MonitoredResourceDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
GetMonitoredResourceDescriptorRequest request = new GetMonitoredResourceDescriptorRequest
{
MonitoredResourceDescriptorName = MonitoredResourceDescriptorName.FromProjectMonitoredResourceDescriptor("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"),
};
// Make the request
MonitoredResourceDescriptor response = await metricServiceClient.GetMonitoredResourceDescriptorAsync(request);
GetMonitoredResourceDescriptorAsync(MonitoredResourceDescriptorName, CallSettings)
public virtual Task<MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(MonitoredResourceDescriptorName name, CallSettings callSettings = null)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | MonitoredResourceDescriptorName Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MonitoredResourceDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredResourceDescriptorName name = MonitoredResourceDescriptorName.FromProjectMonitoredResourceDescriptor("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
// Make the request
MonitoredResourceDescriptor response = await metricServiceClient.GetMonitoredResourceDescriptorAsync(name);
GetMonitoredResourceDescriptorAsync(MonitoredResourceDescriptorName, CancellationToken)
public virtual Task<MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(MonitoredResourceDescriptorName name, CancellationToken cancellationToken)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | MonitoredResourceDescriptorName Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MonitoredResourceDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
MonitoredResourceDescriptorName name = MonitoredResourceDescriptorName.FromProjectMonitoredResourceDescriptor("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
// Make the request
MonitoredResourceDescriptor response = await metricServiceClient.GetMonitoredResourceDescriptorAsync(name);
GetMonitoredResourceDescriptorAsync(String, CallSettings)
public virtual Task<MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(string name, CallSettings callSettings = null)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<MonitoredResourceDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/monitoredResourceDescriptors/[MONITORED_RESOURCE_DESCRIPTOR]";
// Make the request
MonitoredResourceDescriptor response = await metricServiceClient.GetMonitoredResourceDescriptorAsync(name);
GetMonitoredResourceDescriptorAsync(String, CancellationToken)
public virtual Task<MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(string name, CancellationToken cancellationToken)
Gets a single monitored resource descriptor. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<MonitoredResourceDescriptor> | A Task containing the RPC response. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/monitoredResourceDescriptors/[MONITORED_RESOURCE_DESCRIPTOR]";
// Make the request
MonitoredResourceDescriptor response = await metricServiceClient.GetMonitoredResourceDescriptorAsync(name);
ListMetricDescriptors(IResourceName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptors(IResourceName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptors(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (MetricDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMetricDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptors(FolderName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptors(FolderName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptors(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (MetricDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMetricDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptors(OrganizationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptors(OrganizationName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptors(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (MetricDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMetricDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptors(ProjectName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptors(ProjectName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable sequence of MetricDescriptor resources. |
MetricServiceClient client = MetricServiceClient.Create();
ProjectName projectName = ProjectName.FromProject(projectId);
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> metrics = client.ListMetricDescriptors(projectName);
foreach (MetricDescriptor metric in metrics.Take(10))
{
Console.WriteLine($"{metric.Name}: {metric.DisplayName}");
}
ListMetricDescriptors(ListMetricDescriptorsRequest, CallSettings)
public virtual PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptors(ListMetricDescriptorsRequest request, CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | ListMetricDescriptorsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
ListMetricDescriptorsRequest request = new ListMetricDescriptorsRequest
{
Filter = "",
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptors(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (MetricDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMetricDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptors(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptors(string name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptors(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (MetricDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMetricDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptorsAsync(IResourceName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptorsAsync(IResourceName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable asynchronous sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MetricDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMetricDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptorsAsync(FolderName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptorsAsync(FolderName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable asynchronous sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MetricDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMetricDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptorsAsync(OrganizationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptorsAsync(OrganizationName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable asynchronous sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MetricDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMetricDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptorsAsync(ProjectName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptorsAsync(ProjectName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable asynchronous sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MetricDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMetricDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptorsAsync(ListMetricDescriptorsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptorsAsync(ListMetricDescriptorsRequest request, CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | ListMetricDescriptorsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable asynchronous sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ListMetricDescriptorsRequest request = new ListMetricDescriptorsRequest
{
Filter = "",
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptorsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MetricDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMetricDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMetricDescriptorsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> ListMetricDescriptorsAsync(string name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists metric descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> | A pageable asynchronous sequence of MetricDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor> response = metricServiceClient.ListMetricDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MetricDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMetricDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MetricDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MetricDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MetricDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptors(IResourceName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptors(IResourceName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptors(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResourceDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMonitoredResourceDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptors(FolderName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptors(FolderName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptors(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResourceDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMonitoredResourceDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptors(OrganizationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptors(OrganizationName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptors(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResourceDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMonitoredResourceDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptors(ProjectName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptors(ProjectName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptors(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResourceDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMonitoredResourceDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest, CallSettings)
public virtual PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest request, CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | ListMonitoredResourceDescriptorsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
ListMonitoredResourceDescriptorsRequest request = new ListMonitoredResourceDescriptorsRequest
{
Filter = "",
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptors(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResourceDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMonitoredResourceDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptors(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptors(string name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptors(name);
// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResourceDescriptor item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListMonitoredResourceDescriptorsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptorsAsync(IResourceName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptorsAsync(IResourceName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable asynchronous sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResourceDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMonitoredResourceDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptorsAsync(FolderName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptorsAsync(FolderName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable asynchronous sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResourceDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMonitoredResourceDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptorsAsync(OrganizationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptorsAsync(OrganizationName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable asynchronous sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResourceDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMonitoredResourceDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptorsAsync(ProjectName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptorsAsync(ProjectName name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable asynchronous sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResourceDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMonitoredResourceDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest request, CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | ListMonitoredResourceDescriptorsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable asynchronous sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ListMonitoredResourceDescriptorsRequest request = new ListMonitoredResourceDescriptorsRequest
{
Filter = "",
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptorsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResourceDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMonitoredResourceDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListMonitoredResourceDescriptorsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptorsAsync(string name, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists monitored resource descriptors that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> | A pageable asynchronous sequence of MonitoredResourceDescriptor resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = metricServiceClient.ListMonitoredResourceDescriptorsAsync(name);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResourceDescriptor item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMonitoredResourceDescriptorsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MonitoredResourceDescriptor item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MonitoredResourceDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MonitoredResourceDescriptor item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeries(FolderName, String, TimeInterval, ListTimeSeriesRequest.Types.TimeSeriesView, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeries(FolderName name, string filter, TimeInterval interval, ListTimeSeriesRequest.Types.TimeSeriesView view, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project, organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] |
filter | String Required. A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
interval | TimeInterval Required. The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response. |
view | ListTimeSeriesRequest.Types.TimeSeriesView Required. Specifies which information is returned about the time series. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
string filter = "";
TimeInterval interval = new TimeInterval();
ListTimeSeriesRequest.Types.TimeSeriesView view = ListTimeSeriesRequest.Types.TimeSeriesView.Full;
// Make the request
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeries(name, filter, interval, view);
// Iterate over all response items, lazily performing RPCs as required
foreach (TimeSeries item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTimeSeriesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeries(OrganizationName, String, TimeInterval, ListTimeSeriesRequest.Types.TimeSeriesView, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeries(OrganizationName name, string filter, TimeInterval interval, ListTimeSeriesRequest.Types.TimeSeriesView view, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project, organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] |
filter | String Required. A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
interval | TimeInterval Required. The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response. |
view | ListTimeSeriesRequest.Types.TimeSeriesView Required. Specifies which information is returned about the time series. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
string filter = "";
TimeInterval interval = new TimeInterval();
ListTimeSeriesRequest.Types.TimeSeriesView view = ListTimeSeriesRequest.Types.TimeSeriesView.Full;
// Make the request
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeries(name, filter, interval, view);
// Iterate over all response items, lazily performing RPCs as required
foreach (TimeSeries item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTimeSeriesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeries(ProjectName, String, TimeInterval, ListTimeSeriesRequest.Types.TimeSeriesView, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeries(ProjectName name, string filter, TimeInterval interval, ListTimeSeriesRequest.Types.TimeSeriesView view, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project, organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] |
filter | String Required. A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
interval | TimeInterval Required. The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response. |
view | ListTimeSeriesRequest.Types.TimeSeriesView Required. Specifies which information is returned about the time series. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
string filter = "";
TimeInterval interval = new TimeInterval();
ListTimeSeriesRequest.Types.TimeSeriesView view = ListTimeSeriesRequest.Types.TimeSeriesView.Full;
// Make the request
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeries(name, filter, interval, view);
// Iterate over all response items, lazily performing RPCs as required
foreach (TimeSeries item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTimeSeriesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeries(ListTimeSeriesRequest, CallSettings)
public virtual PagedEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeries(ListTimeSeriesRequest request, CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | ListTimeSeriesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
ListTimeSeriesRequest request = new ListTimeSeriesRequest
{
Filter = "",
Interval = new TimeInterval(),
Aggregation = new Aggregation(),
OrderBy = "",
View = ListTimeSeriesRequest.Types.TimeSeriesView.Full,
ProjectName = ProjectName.FromProject("[PROJECT]"),
SecondaryAggregation = new Aggregation(),
};
// Make the request
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeries(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (TimeSeries item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTimeSeriesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeries(String, String, TimeInterval, ListTimeSeriesRequest.Types.TimeSeriesView, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeries(string name, string filter, TimeInterval interval, ListTimeSeriesRequest.Types.TimeSeriesView view, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The project, organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] |
filter | String Required. A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
interval | TimeInterval Required. The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response. |
view | ListTimeSeriesRequest.Types.TimeSeriesView Required. Specifies which information is returned about the time series. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = MetricServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
string filter = "";
TimeInterval interval = new TimeInterval();
ListTimeSeriesRequest.Types.TimeSeriesView view = ListTimeSeriesRequest.Types.TimeSeriesView.Full;
// Make the request
PagedEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeries(name, filter, interval, view);
// Iterate over all response items, lazily performing RPCs as required
foreach (TimeSeries item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTimeSeriesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeriesAsync(FolderName, String, TimeInterval, ListTimeSeriesRequest.Types.TimeSeriesView, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeriesAsync(FolderName name, string filter, TimeInterval interval, ListTimeSeriesRequest.Types.TimeSeriesView view, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project, organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] |
filter | String Required. A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
interval | TimeInterval Required. The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response. |
view | ListTimeSeriesRequest.Types.TimeSeriesView Required. Specifies which information is returned about the time series. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable asynchronous sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
string filter = "";
TimeInterval interval = new TimeInterval();
ListTimeSeriesRequest.Types.TimeSeriesView view = ListTimeSeriesRequest.Types.TimeSeriesView.Full;
// Make the request
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeriesAsync(name, filter, interval, view);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TimeSeries item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTimeSeriesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeriesAsync(OrganizationName, String, TimeInterval, ListTimeSeriesRequest.Types.TimeSeriesView, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeriesAsync(OrganizationName name, string filter, TimeInterval interval, ListTimeSeriesRequest.Types.TimeSeriesView view, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project, organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] |
filter | String Required. A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
interval | TimeInterval Required. The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response. |
view | ListTimeSeriesRequest.Types.TimeSeriesView Required. Specifies which information is returned about the time series. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable asynchronous sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
string filter = "";
TimeInterval interval = new TimeInterval();
ListTimeSeriesRequest.Types.TimeSeriesView view = ListTimeSeriesRequest.Types.TimeSeriesView.Full;
// Make the request
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeriesAsync(name, filter, interval, view);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TimeSeries item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTimeSeriesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeriesAsync(ProjectName, String, TimeInterval, ListTimeSeriesRequest.Types.TimeSeriesView, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeriesAsync(ProjectName name, string filter, TimeInterval interval, ListTimeSeriesRequest.Types.TimeSeriesView view, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project, organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] |
filter | String Required. A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
interval | TimeInterval Required. The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response. |
view | ListTimeSeriesRequest.Types.TimeSeriesView Required. Specifies which information is returned about the time series. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable asynchronous sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
string filter = "";
TimeInterval interval = new TimeInterval();
ListTimeSeriesRequest.Types.TimeSeriesView view = ListTimeSeriesRequest.Types.TimeSeriesView.Full;
// Make the request
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeriesAsync(name, filter, interval, view);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TimeSeries item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTimeSeriesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeriesAsync(ListTimeSeriesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeriesAsync(ListTimeSeriesRequest request, CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
request | ListTimeSeriesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable asynchronous sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
ListTimeSeriesRequest request = new ListTimeSeriesRequest
{
Filter = "",
Interval = new TimeInterval(),
Aggregation = new Aggregation(),
OrderBy = "",
View = ListTimeSeriesRequest.Types.TimeSeriesView.Full,
ProjectName = ProjectName.FromProject("[PROJECT]"),
SecondaryAggregation = new Aggregation(),
};
// Make the request
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeriesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TimeSeries item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTimeSeriesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTimeSeriesAsync(String, String, TimeInterval, ListTimeSeriesRequest.Types.TimeSeriesView, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> ListTimeSeriesAsync(string name, string filter, TimeInterval interval, ListTimeSeriesRequest.Types.TimeSeriesView view, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists time series that match a filter. This method does not require a Workspace.
Parameters | |
---|---|
Name | Description |
name | String Required. The project, organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] |
filter | String Required. A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
interval | TimeInterval Required. The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response. |
view | ListTimeSeriesRequest.Types.TimeSeriesView Required. Specifies which information is returned about the time series. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> | A pageable asynchronous sequence of TimeSeries resources. |
// Create client
MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
string filter = "";
TimeInterval interval = new TimeInterval();
ListTimeSeriesRequest.Types.TimeSeriesView view = ListTimeSeriesRequest.Types.TimeSeriesView.Full;
// Make the request
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries> response = metricServiceClient.ListTimeSeriesAsync(name, filter, interval, view);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TimeSeries item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTimeSeriesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TimeSeries item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TimeSeries> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TimeSeries item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.