Class DomainDeliveryRepositoriesFirewallRulesClient
public class DomainDeliveryRepositoriesFirewallRulesClient
- Inheritance
-
DomainDeliveryRepositoriesFirewallRulesClient
- Inherited Members
Constructors
DomainDeliveryRepositoriesFirewallRulesClient(string, HttpClient)
public DomainDeliveryRepositoriesFirewallRulesClient(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(long, int, CancellationToken)
Deletes the specified firewall rule from the Repository database.
public virtual Task DeleteAsync(long repositoryId, int firewallRuleId, CancellationToken cancellationToken = default)
Parameters
repositoryIdlongThe repository id.
firewallRuleIdintThe id of the firewall rule to delete.
cancellationTokenCancellationTokenA 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
repositoryIdlongThe repository id.
cancellationTokenCancellationTokenA 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
repositoryIdlongThe repository id.
firewallRuleIdintThe id of the firewall rule.
cancellationTokenCancellationTokenA 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
repositoryIdlongThe repository id.
modelFirewallRuleModelThe details for the firewall rule to be added.
cancellationTokenCancellationTokenA 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
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T