Installation
- .NET CLI
- Package Reference
- Nuget
Defaults
By default, theShareServiceClient instance is resolved from service provider. AzureFileShareHealthCheckOptions does not provide any specific share name, so the health check fetches just first share.
Customization
You can additionally add the following parameters:clientFactory: A factory method to provideShareServiceClientinstance.optionsFactory: A factory method to provideAzureFileShareHealthCheckOptionsinstance. It allows to specify the share name.name: The health check name. The default isazure_file_share.failureStatus: TheHealthStatusthat should be reported when the health check fails. Default isHealthStatus.Unhealthy.tags: A list of tags that can be used to filter sets of health checks.timeout: ASystem.TimeSpanrepresenting the timeout of the check.
Breaking changes
In the prior releases,AzureFileShareHealthCheck was a part of Pulse.AzureStorage package. It had a dependency on not just Azure.Storage.Files.Shares, but also Azure.Storage.Queues and Azure.Storage.Blobs. The packages have been split to avoid bringing unnecessary dependencies. Moreover, AzureFileShareHealthCheck was letting the users specify how ShareServiceClient should be created (from raw connection string), at a cost of maintaining an internal, static client instances cache. Now the type does not create client instances nor maintain an internal cache and it’s the caller responsibility to provide the instance of ShareServiceClient (please see #2040 for more details). Since Azure SDK recommends treating clients as singletons