Class SdkServiceIdValidator

  • All Implemented Interfaces:
    Validator

    public final class SdkServiceIdValidator
    extends AbstractValidator
    Validates that SDK service IDs are correct and do not match any prohibited patterns.
    • Must match the following regex: ^[a-zA-Z][a-zA-Z0-9]*( [a-zA-Z0-9]+)*$
    • Must not contain "Amazon", "AWS", or "Aws"
    • Must not case-insensitively end with "Service", "Client", or "API".
    • Constructor Detail

      • SdkServiceIdValidator

        public SdkServiceIdValidator()
    • Method Detail

      • validate

        public java.util.List<ValidationEvent> validate​(Model model)
        Description copied from interface: Validator
        Validates a model and returns a list of validation events.
        Parameters:
        model - Model to validate.
        Returns:
        List of validation events.
      • isPreviouslyReleasedInvalidServiceId

        public static boolean isPreviouslyReleasedInvalidServiceId​(java.lang.String serviceId)
        Checks if the given value is a previously released but invalid service ID.
        Parameters:
        serviceId - Service ID value to check.
        Returns:
        Returns true if the service ID is approved but invalid.
      • validateServiceId

        public static void validateServiceId​(java.lang.String serviceId)
        Validates a service ID value.
        Parameters:
        serviceId - Service ID to validate.
        Throws:
        java.lang.IllegalArgumentException - if the service ID is invalid.