Class DomainSubscriptionsClient
public class DomainSubscriptionsClient
- Inheritance
-
DomainSubscriptionsClient
- Inherited Members
Constructors
DomainSubscriptionsClient(string, HttpClient)
public DomainSubscriptionsClient(string baseUrl, HttpClient httpClient)
Parameters
baseUrlstringhttpClientHttpClient
Properties
BaseUrl
public string BaseUrl { get; set; }
Property Value
JsonSerializerSettings
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
- JsonSerializerSettings
ReadResponseAsString
public bool ReadResponseAsString { get; set; }
Property Value
Methods
DeleteAsync(string, CancellationToken)
Deletes an Event Grid Domain Topic Subscription.
public virtual Task DeleteAsync(string name, CancellationToken cancellationToken = default)
Parameters
namestringThe subscription name.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
Deleted
Exceptions
- NfieldSdkException
A server side error occurred.
GetAllAsync(CancellationToken)
Gets a list of Event Grid Domain Topic Subscriptions for the domain.
public virtual Task<ICollection<SubscriptionModel>> GetAllAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<SubscriptionModel>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
GetAsync(string, CancellationToken)
Gets an Event Grid Domain Topic Subscription.
public virtual Task<SubscriptionModel> GetAsync(string name, CancellationToken cancellationToken = default)
Parameters
namestringThe subscription name.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SubscriptionModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PatchAsync(string, UpdateSubscriptionModel, CancellationToken)
Updates an Event Grid Domain Topic Subscription.
public virtual Task PatchAsync(string name, UpdateSubscriptionModel model, CancellationToken cancellationToken = default)
Parameters
namestringThe subscription name.
modelUpdateSubscriptionModelThe UpdateSubscriptionModel>
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
NoContent, if succeeded. The appropriate exception in case of failure. BadRequest in case of error.
Exceptions
- NfieldSdkException
A server side error occurred.
PostAsync(CreateSubscriptionModel, CancellationToken)
Creates an Event Grid Domain Topic Subscription based on the given data.
public virtual Task<SubscriptionModel> PostAsync(CreateSubscriptionModel model, CancellationToken cancellationToken = default)
Parameters
modelCreateSubscriptionModelThe CreateSubscriptionModel.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SubscriptionModel>
Created
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<DomainSubscriptionsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T