1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
module Fog
module Google
class Monitoring
class Real
##
# Create a timeseries. User-created time series should only be used with custom metrics.
#
# @param timeseries [Array<Hash>] Timeseries to create/update.
# @see https://cloud.google.com/monitoring/api/ref_v3/rest/v3/TimeSeries for expected format.
# @see https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/create
#
def create_timeseries(timeseries: [])
request = ::Google::Apis::MonitoringV3::CreateTimeSeriesRequest.new(
time_series: timeseries
)
@monitoring.create_project_time_series("projects/#{@project}", request)
end
end
class Mock
def create_timeseries(_timeseries: [])
# :no-coverage:
Fog::Mock.not_implemented
# :no-coverage:
end
end
end
end
end
|