Пример #1
0
        public async Task <EntityShortRepresentation> CreateAlertingProfileAsync(AlertingProfile body, CancellationToken cancellationToken = default)
        {
            var response = await GetAlertingProfilesUrl()
                           .PostJsonAsync(body, cancellationToken)
                           .ReceiveJsonWithErrorChecking <EntityShortRepresentation>()
                           .ConfigureAwait(false);

            return(response);
        }
Пример #2
0
        public async Task <EntityShortRepresentation> UpdateAlertingProfileAsync(string alertingProfileId, AlertingProfile body, CancellationToken cancellationToken = default)
        {
            var response = await GetAlertingProfilesUrl()
                           .AppendPathSegment(alertingProfileId)
                           .PutJsonAsync(body, cancellationToken)
                           .ReceiveJsonWithErrorChecking <EntityShortRepresentation>()
                           .ConfigureAwait(false);

            return(response);
        }