Table of Contents

Class DomainSubscriptionsClient

Namespace
Nfield.SDK
Assembly
Nfield.Public.SDK.dll
public class DomainSubscriptionsClient
Inheritance
DomainSubscriptionsClient
Inherited Members

Constructors

DomainSubscriptionsClient(string, HttpClient)

public DomainSubscriptionsClient(string baseUrl, HttpClient httpClient)

Parameters

baseUrl string
httpClient HttpClient

Properties

BaseUrl

public string BaseUrl { get; set; }

Property Value

string

JsonSerializerSettings

protected JsonSerializerSettings JsonSerializerSettings { get; }

Property Value

JsonSerializerSettings

ReadResponseAsString

public bool ReadResponseAsString { get; set; }

Property Value

bool

Methods

DeleteAsync(string, CancellationToken)

Deletes an Event Grid Domain Topic Subscription.

public virtual Task DeleteAsync(string name, CancellationToken cancellationToken = default)

Parameters

name string

The subscription name.

cancellationToken CancellationToken

A 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

cancellationToken CancellationToken

A 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

name string

The subscription name.

cancellationToken CancellationToken

A 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

name string

The subscription name.

model UpdateSubscriptionModel

The UpdateSubscriptionModel>

cancellationToken CancellationToken

A 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

model CreateSubscriptionModel

The CreateSubscriptionModel.

cancellationToken CancellationToken

A 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

response HttpResponseMessage
headers IReadOnlyDictionary<string, IEnumerable<string>>
cancellationToken CancellationToken

Returns

Task<DomainSubscriptionsClient.ObjectResponseResult<T>>

Type Parameters

T