Пример #1
0
        public async Task <bool> UpdateAnomalyDetectionDiskEventRuleAsync(string id, DiskEventAnomalyDetectionConfig body, CancellationToken cancellationToken = default)
        {
            var response = await GetAnomalyDetectionDiskEventsUrl()
                           .AppendPathSegment(id)
                           .PutJsonAsync(body, cancellationToken)
                           .ConfigureAwait(false);

            return(response.IsSuccessStatusCode);
        }
Пример #2
0
        public async Task <EntityShortRepresentation> AddAnomalyDetectionDiskEventRuleAsync(DiskEventAnomalyDetectionConfig body, CancellationToken cancellationToken = default)
        {
            var response = await GetAnomalyDetectionDiskEventsUrl()
                           .PostJsonAsync(body, cancellationToken)
                           .ReceiveJsonWithErrorChecking <EntityShortRepresentation>()
                           .ConfigureAwait(false);

            return(response);
        }