Table of Contents

Class S3ConnectorValidator

Namespace
Datafication.Connectors.S3Connector
Assembly
Datafication.S3Connector.dll

Validates configurations for S3 data connectors.

public class S3ConnectorValidator : IDataConnectorConfigurationValidator
Inheritance
object
S3ConnectorValidator
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

configuration IDataConnectorConfiguration

The 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:

  1. Checks if the configuration is null
  2. Verifies if the configuration is of the correct type (S3ConnectorConfiguration)
  3. Validates the presence of required fields (Id, Region, BucketName, ObjectKey)
  4. Ensures authentication parameters are consistent (either both AccessKeyId and SecretAccessKey are provided, or both are null for anonymous access)
  5. Validates ServiceUrl format if provided