public AzureRmSqlManagedInstanceTransparentDataEncryptionProtectorModel(string resourceGroupName, string managedInstanceName, EncryptionProtectorType type, string keyId, bool?autoRotatonEnabled) : this(resourceGroupName, managedInstanceName) { Type = type; KeyId = keyId; AutoRotationEnabled = autoRotatonEnabled; }
/// <summary> /// Create a AzureRmSqlManagedInstanceTransparentDataEncryptionProtectorModel from a given ManagedInstanceEncryptionProtector /// </summary> /// <param name="resourceGroupName"></param> /// <param name="managedInstanceName"></param> /// <param name="managedInstanceEncryptionProtector"></param> /// <returns></returns> public static AzureRmSqlManagedInstanceTransparentDataEncryptionProtectorModel FromManagedInstanceEncryptionProtector( string resourceGroupName, string managedInstanceName, ManagedInstanceEncryptionProtector managedInstanceEncryptionProtector) { EncryptionProtectorType type = EncryptionProtectorType.ServiceManaged; Enum.TryParse <Model.EncryptionProtectorType>(managedInstanceEncryptionProtector.ServerKeyType, true, out type); return(new AzureRmSqlManagedInstanceTransparentDataEncryptionProtectorModel( resourceGroupName: resourceGroupName, managedInstanceName: managedInstanceName) { ManagedInstanceKeyVaultKeyName = managedInstanceEncryptionProtector.ServerKeyName, Type = type, KeyId = managedInstanceEncryptionProtector.Uri }); }