Table of Contents

Class DomainDeliveryRepositoriesFirewallRulesClient

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

Constructors

DomainDeliveryRepositoriesFirewallRulesClient(string, HttpClient)

public DomainDeliveryRepositoriesFirewallRulesClient(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(long, int, CancellationToken)

Deletes the specified firewall rule from the Repository database.

public virtual Task DeleteAsync(long repositoryId, int firewallRuleId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

firewallRuleId int

The id of the firewall rule to delete.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

Deletes the specified firewall rule from the Repository database

Exceptions

NfieldSdkException

A server side error occurred.

GetAllAsync(long, CancellationToken)

Returns the firewall rules configured for the repository database.

public virtual Task<ICollection<FirewallRuleModel>> GetAllAsync(long repositoryId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<ICollection<FirewallRuleModel>>

Returns the firewall rules configured for the repository database

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(long, int, CancellationToken)

Returns the firewall rule configured for the repository database by specified rule id.

public virtual Task<FirewallRuleModel> GetAsync(long repositoryId, int firewallRuleId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

firewallRuleId int

The id of the firewall rule.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<FirewallRuleModel>

Returns the selected firewall rule configured for the repository database

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(long, FirewallRuleModel, CancellationToken)

Adds a firewall rule to allow access to repository database for specific IP addresses.

public virtual Task PostAsync(long repositoryId, FirewallRuleModel model, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

model FirewallRuleModel

The details for the firewall rule to be added.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

A firewall rule has been added to the repository database

Exceptions

NfieldSdkException

A server side error occurred.

ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)

protected virtual Task<DomainDeliveryRepositoriesFirewallRulesClient.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<DomainDeliveryRepositoriesFirewallRulesClient.ObjectResponseResult<T>>

Type Parameters

T