Class MetricServiceClient (2.5.0)

public abstract class MetricServiceClient

MetricService client wrapper, for convenient use.

Inheritance

Object > MetricServiceClient

Derived Types

Namespace

Google.Cloud.Monitoring.V3

Assembly

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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default MetricService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

GrpcClient

public virtual MetricService.MetricServiceClient GrpcClient { get; }

The underlying gRPC MetricService client

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameIResourceName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameFolderName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameOrganizationName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
requestCreateMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameString

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameIResourceName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameIResourceName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameFolderName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameFolderName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameOrganizationName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameOrganizationName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
requestCreateMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
requestCreateMetricDescriptorRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameString

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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. The creation is executed asynchronously and callers may check the returned operation to track its progress. User-created metric descriptors define custom metrics.

Parameters
NameDescription
nameString

Required. The project on which to execute the request. The format is: 4 projects/[PROJECT_ID_OR_NUMBER]

metricDescriptorMetricDescriptor

Required. The new custom metric descriptor.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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);

CreateServiceTimeSeries(ProjectName, IEnumerable<TimeSeries>, CallSettings)

public virtual void CreateServiceTimeSeries(ProjectName name, IEnumerable<TimeSeries> timeSeries, CallSettings callSettings = null)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. 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. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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.CreateServiceTimeSeries(name, timeSeries);

CreateServiceTimeSeries(CreateTimeSeriesRequest, CallSettings)

public virtual void CreateServiceTimeSeries(CreateTimeSeriesRequest request, CallSettings callSettings = null)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. 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. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
NameDescription
requestCreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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.CreateServiceTimeSeries(request);

CreateServiceTimeSeries(String, IEnumerable<TimeSeries>, CallSettings)

public virtual void CreateServiceTimeSeries(string name, IEnumerable<TimeSeries> timeSeries, CallSettings callSettings = null)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. 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. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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.CreateServiceTimeSeries(name, timeSeries);

CreateServiceTimeSeriesAsync(ProjectName, IEnumerable<TimeSeries>, CallSettings)

public virtual Task CreateServiceTimeSeriesAsync(ProjectName name, IEnumerable<TimeSeries> timeSeries, CallSettings callSettings = null)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. 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. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.CreateServiceTimeSeriesAsync(name, timeSeries);

CreateServiceTimeSeriesAsync(ProjectName, IEnumerable<TimeSeries>, CancellationToken)

public virtual Task CreateServiceTimeSeriesAsync(ProjectName name, IEnumerable<TimeSeries> timeSeries, CancellationToken cancellationToken)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. 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. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.CreateServiceTimeSeriesAsync(name, timeSeries);

CreateServiceTimeSeriesAsync(CreateTimeSeriesRequest, CallSettings)

public virtual Task CreateServiceTimeSeriesAsync(CreateTimeSeriesRequest request, CallSettings callSettings = null)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. 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. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
NameDescription
requestCreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.CreateServiceTimeSeriesAsync(request);

CreateServiceTimeSeriesAsync(CreateTimeSeriesRequest, CancellationToken)

public virtual Task CreateServiceTimeSeriesAsync(CreateTimeSeriesRequest request, CancellationToken cancellationToken)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. 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. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
NameDescription
requestCreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.CreateServiceTimeSeriesAsync(request);

CreateServiceTimeSeriesAsync(String, IEnumerable<TimeSeries>, CallSettings)

public virtual Task CreateServiceTimeSeriesAsync(string name, IEnumerable<TimeSeries> timeSeries, CallSettings callSettings = null)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. 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. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.CreateServiceTimeSeriesAsync(name, timeSeries);

CreateServiceTimeSeriesAsync(String, IEnumerable<TimeSeries>, CancellationToken)

public virtual Task CreateServiceTimeSeriesAsync(string name, IEnumerable<TimeSeries> timeSeries, CancellationToken cancellationToken)

Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. 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. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] instead.

Parameters
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.CreateServiceTimeSeriesAsync(name, timeSeries);

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
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
requestCreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateTimeSeriesRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

timeSeriesIEnumerable<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 TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.

The maximum number of TimeSeries objects per Create request is 200.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameIResourceName

Required. The metric descriptor on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID]

An example of [METRIC_ID] is: &quot;custom.googleapis.com/my_test_metric&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
requestDeleteMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
nameMetricDescriptorName

Required. The metric descriptor on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID]

An example of [METRIC_ID] is: &quot;custom.googleapis.com/my_test_metric&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
nameString

Required. The metric descriptor on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID]

An example of [METRIC_ID] is: &quot;custom.googleapis.com/my_test_metric&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
nameIResourceName

Required. The metric descriptor on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID]

An example of [METRIC_ID] is: &quot;custom.googleapis.com/my_test_metric&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameIResourceName

Required. The metric descriptor on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID]

An example of [METRIC_ID] is: &quot;custom.googleapis.com/my_test_metric&quot;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteMetricDescriptorRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameMetricDescriptorName

Required. The metric descriptor on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID]

An example of [METRIC_ID] is: &quot;custom.googleapis.com/my_test_metric&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameMetricDescriptorName

Required. The metric descriptor on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID]

An example of [METRIC_ID] is: &quot;custom.googleapis.com/my_test_metric&quot;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The metric descriptor on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID]

An example of [METRIC_ID] is: &quot;custom.googleapis.com/my_test_metric&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The metric descriptor on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID]

An example of [METRIC_ID] is: &quot;custom.googleapis.com/my_test_metric&quot;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameIResourceName

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 [METRIC_ID] is &quot;compute.googleapis.com/instance/disk/read_bytes_count&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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
NameDescription
requestGetMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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
NameDescription
nameMetricDescriptorName

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 [METRIC_ID] is &quot;compute.googleapis.com/instance/disk/read_bytes_count&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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
NameDescription
nameString

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 [METRIC_ID] is &quot;compute.googleapis.com/instance/disk/read_bytes_count&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MetricDescriptor

The RPC response.

Example
// 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
NameDescription
nameIResourceName

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 [METRIC_ID] is &quot;compute.googleapis.com/instance/disk/read_bytes_count&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameIResourceName

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 [METRIC_ID] is &quot;compute.googleapis.com/instance/disk/read_bytes_count&quot;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetMetricDescriptorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetMetricDescriptorRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameMetricDescriptorName

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 [METRIC_ID] is &quot;compute.googleapis.com/instance/disk/read_bytes_count&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameMetricDescriptorName

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 [METRIC_ID] is &quot;compute.googleapis.com/instance/disk/read_bytes_count&quot;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

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 [METRIC_ID] is &quot;compute.googleapis.com/instance/disk/read_bytes_count&quot;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

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 [METRIC_ID] is &quot;compute.googleapis.com/instance/disk/read_bytes_count&quot;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MetricDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameIResourceName

Required. The monitored resource descriptor to get. The format is:

projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]

The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MonitoredResourceDescriptor

The RPC response.

Example
// 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
NameDescription
requestGetMonitoredResourceDescriptorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MonitoredResourceDescriptor

The RPC response.

Example
// 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
NameDescription
nameMonitoredResourceDescriptorName

Required. The monitored resource descriptor to get. The format is:

projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]

The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MonitoredResourceDescriptor

The RPC response.

Example
// 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
NameDescription
nameString

Required. The monitored resource descriptor to get. The format is:

projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]

The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
MonitoredResourceDescriptor

The RPC response.

Example
// 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
NameDescription
nameIResourceName

Required. The monitored resource descriptor to get. The format is:

projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]

The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MonitoredResourceDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameIResourceName

Required. The monitored resource descriptor to get. The format is:

projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]

The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MonitoredResourceDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetMonitoredResourceDescriptorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MonitoredResourceDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetMonitoredResourceDescriptorRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MonitoredResourceDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameMonitoredResourceDescriptorName

Required. The monitored resource descriptor to get. The format is:

projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]

The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MonitoredResourceDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameMonitoredResourceDescriptorName

Required. The monitored resource descriptor to get. The format is:

projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]

The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MonitoredResourceDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The monitored resource descriptor to get. The format is:

projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]

The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<MonitoredResourceDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The monitored resource descriptor to get. The format is:

projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE]

The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<MonitoredResourceDescriptor>

A Task containing the RPC response.

Example
// 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
NameDescription
nameIResourceName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameFolderName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameOrganizationName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable sequence of MetricDescriptor resources.

Example
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
NameDescription
requestListMetricDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameIResourceName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable asynchronous sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameFolderName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable asynchronous sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameOrganizationName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable asynchronous sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable asynchronous sequence of MetricDescriptor resources.

Example
// 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
NameDescription
requestListMetricDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable asynchronous sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMetricDescriptorsResponse, MetricDescriptor>

A pageable asynchronous sequence of MetricDescriptor resources.

Example
// 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
NameDescription
nameIResourceName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameFolderName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameOrganizationName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
requestListMonitoredResourceDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameIResourceName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable asynchronous sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameFolderName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable asynchronous sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameOrganizationName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable asynchronous sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable asynchronous sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
requestListMonitoredResourceDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable asynchronous sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor>

A pageable asynchronous sequence of MonitoredResourceDescriptor resources.

Example
// 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
NameDescription
nameFolderName

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]

filterString

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"

intervalTimeInterval

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.

viewListTimeSeriesRequest.Types.TimeSeriesView

Required. Specifies which information is returned about the time series.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable sequence of TimeSeries resources.

Example
// 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
NameDescription
nameOrganizationName

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]

filterString

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"

intervalTimeInterval

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.

viewListTimeSeriesRequest.Types.TimeSeriesView

Required. Specifies which information is returned about the time series.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable sequence of TimeSeries resources.

Example
// 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
NameDescription
nameProjectName

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]

filterString

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"

intervalTimeInterval

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.

viewListTimeSeriesRequest.Types.TimeSeriesView

Required. Specifies which information is returned about the time series.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable sequence of TimeSeries resources.

Example
// 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
NameDescription
requestListTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable sequence of TimeSeries resources.

Example
// 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
NameDescription
nameString

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]

filterString

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"

intervalTimeInterval

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.

viewListTimeSeriesRequest.Types.TimeSeriesView

Required. Specifies which information is returned about the time series.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable sequence of TimeSeries resources.

Example
// 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
NameDescription
nameFolderName

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]

filterString

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"

intervalTimeInterval

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.

viewListTimeSeriesRequest.Types.TimeSeriesView

Required. Specifies which information is returned about the time series.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable asynchronous sequence of TimeSeries resources.

Example
// 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
NameDescription
nameOrganizationName

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]

filterString

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"

intervalTimeInterval

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.

viewListTimeSeriesRequest.Types.TimeSeriesView

Required. Specifies which information is returned about the time series.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable asynchronous sequence of TimeSeries resources.

Example
// 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
NameDescription
nameProjectName

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]

filterString

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"

intervalTimeInterval

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.

viewListTimeSeriesRequest.Types.TimeSeriesView

Required. Specifies which information is returned about the time series.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable asynchronous sequence of TimeSeries resources.

Example
// 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
NameDescription
requestListTimeSeriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable asynchronous sequence of TimeSeries resources.

Example
// 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
NameDescription
nameString

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]

filterString

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"

intervalTimeInterval

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.

viewListTimeSeriesRequest.Types.TimeSeriesView

Required. Specifies which information is returned about the time series.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTimeSeriesResponse, TimeSeries>

A pageable asynchronous sequence of TimeSeries resources.

Example
// 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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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.