/// <summary>
        /// Provides a managed instance threat detection policy model for the given managed instance
        /// </summary>
        public ManagedInstanceThreatDetectionPolicyModel GetManagedInstanceThreatDetectionPolicy(string resourceGroup, string managedInstanceName)
        {
            var threatDetectionPolicy = ThreatDetectionCommunicator.GetManageInstanceSecurityAlertPolicy(resourceGroup, managedInstanceName);

            var managedInstanceThreatDetectionPolicyModel = new ManagedInstanceThreatDetectionPolicyModel()
            {
                ThreatDetectionState         = ModelizeThreatDetectionState(threatDetectionPolicy.State.ToString()),
                NotificationRecipientsEmails = string.Join(";", threatDetectionPolicy.EmailAddresses.ToArray()),
                EmailAdmins     = threatDetectionPolicy.EmailAccountAdmins == null ? false : threatDetectionPolicy.EmailAccountAdmins.Value,
                RetentionInDays = (uint)threatDetectionPolicy.RetentionDays,
            };

            managedInstanceThreatDetectionPolicyModel.ExcludedDetectionTypes = threatDetectionPolicy.DisabledAlerts.Where(alert => !string.IsNullOrEmpty(alert)).ToArray() ?? new string[] { };
            managedInstanceThreatDetectionPolicyModel.ResourceGroupName      = resourceGroup;
            managedInstanceThreatDetectionPolicyModel.ServerName             = managedInstanceName;

            ModelizeStorageAccount(managedInstanceThreatDetectionPolicyModel, threatDetectionPolicy.StorageEndpoint);

            return(managedInstanceThreatDetectionPolicyModel);
        }
        /// <summary>
        /// Transforms the given model to its endpoints acceptable structure and sends it to the endpoint
        /// </summary>
        public void SetManagedInstanceThreatDetectionPolicy(ManagedInstanceThreatDetectionPolicyModel model, string storageEndpointSuffix)
        {
            var managedInstanceSecurityAlertPolicyParameters = PolicizeManagedInstanceSecurityAlertModel(model, storageEndpointSuffix);

            ThreatDetectionCommunicator.SetManagedInstanceSecurityAlertPolicy(model.ResourceGroupName, model.ServerName, managedInstanceSecurityAlertPolicyParameters);
        }