Class S3ConnectorValidator
- Namespace
- Datafication.Connectors.S3Connector
- Assembly
- Datafication.S3Connector.dll
Validates configurations for S3 data connectors.
public class S3ConnectorValidator : IDataConnectorConfigurationValidator
- Inheritance
-
objectS3ConnectorValidator
- Implements
Remarks
This validator ensures that the S3 connector configuration is properly set up before attempting to connect to the data source. It validates the presence of required fields and the consistency of authentication parameters.
Methods
Validate(IDataConnectorConfiguration)
Validates the provided configuration for an S3 data connector.
public ValidationResult Validate(IDataConnectorConfiguration configuration)
Parameters
configurationIDataConnectorConfigurationThe configuration to validate.
Returns
- ValidationResult
A validation result indicating whether the configuration is valid and any error messages if it is not.
Remarks
This method performs the following validations:
- Checks if the configuration is null
- Verifies if the configuration is of the correct type (S3ConnectorConfiguration)
- Validates the presence of required fields (Id, Region, BucketName, ObjectKey)
- Ensures authentication parameters are consistent (either both AccessKeyId and SecretAccessKey are provided, or both are null for anonymous access)
- Validates ServiceUrl format if provided